diff --git a/examples/placeholder/linux/apps/app1/ciTests.json b/examples/placeholder/linux/apps/app1/ciTests.json index 2a505b5fa74961..a54ee164a0d197 100644 --- a/examples/placeholder/linux/apps/app1/ciTests.json +++ b/examples/placeholder/linux/apps/app1/ciTests.json @@ -1,20 +1,12 @@ { "Test": [ "Test_TC_BINFO_2_3_Simulated", - "Test_TC_ACT_3_1_Simulated", - "Test_TC_BOOL_3_1_Simulated", "Test_TC_DESC_2_2_Simulated", "Test_TC_DGETH_3_1_Simulated", "Test_TC_DGSW_3_1_Simulated", "Test_TC_DGWIFI_3_1_Simulated", - "Test_TC_FLW_3_1_Simulated", "Test_TC_G_3_1_Simulated", - "Test_TC_I_3_1_Simulated", - "Test_TC_PRS_3_1_Simulated", - "Test_TC_PS_3_1_Simulated", - "Test_TC_PSCFG_3_1_Simulated", "Test_TC_RH_3_1_Simulated", - "Test_TC_SWTCH_3_1_Simulated", "Test_TC_WNCV_5_1_Simulated", "Test_TC_LCFG_3_1_Simulated", "Test_TC_LUNIT_1_1_Simulated", diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_10.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_10.yaml index 3e683e146d6e74..215cac7e23eb19 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_10.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_10.yaml @@ -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: 133.2.3. [TC-ACL-2.10] Extension attribute +name: 133.2.3. [TC-ACL-2.10] Persistence PICS: - ACL.S @@ -71,6 +71,7 @@ tests: saveAs: TH1FabricIndex - label: "Step 3:TH1 puts DUT into commissioning mode" + PICS: PICS_SDK_CI_ONLY && CADMIN.S.C00.Rsp cluster: "Administrator Commissioning" command: "OpenCommissioningWindow" timedInteractionTimeoutMs: 10000 @@ -88,6 +89,7 @@ tests: value: "SPAKE2P Key Salt" - label: "Waiting after opening commissioning window" + PICS: PICS_SDK_CI_ONLY && CADMIN.S.C00.Rsp cluster: "DelayCommands" command: "WaitForMs" arguments: @@ -95,7 +97,37 @@ tests: - name: "ms" value: waitAfterCommissioning + - label: + "TH1 puts DUT into commissioning mode, TH2 commissions DUT using admin + node ID N2" + verification: | + Open a commissioning window On TH1(Chiptool)using below command + + ./chip-tool pairing open-commissioning-window 1 1 400 2000 3841 + + [1657186324.710951][10820:10825] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 Status=0x0 + [1657186324.710980][10820:10825] CHIP:CTL: Successfully opened pairing window On TH(Chiptool)e device + [1657186324.711048][10820:10825] CHIP:CTL: Manual pairing code: [36253605617] + [1657186324.711108][10820:10825] CHIP:CTL: SetupQRCode: [MT:-24J0IRV01A7TB7E700] + + + Commission TH2(Chiptool) to DUT using manualcode generated in TH1 using open commission window + + ./chip-tool pairing code 2 36253605617 --commissioner-name beta --commissioner-nodeid 223344 + [1657186359.584672][3509:3514] CHIP:CTL: Successfully finished commissioning step 'Cleanup' + [1657186359.584743][3509:3514] CHIP:TOO: Device commissioning completed with success + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" + - label: "TH2 starts a commissioning process with DUT" + PICS: PICS_SDK_CI_ONLY identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" @@ -106,7 +138,8 @@ tests: - name: "payload" value: payload - - label: "DUT is commissioned by TH2 on Fabric ID2 " + - label: "DUT is commissioned by TH2 on Fabric ID2" + PICS: PICS_SDK_CI_ONLY identity: "beta" cluster: "DelayCommands" command: "WaitForCommissionee" @@ -223,6 +256,7 @@ tests: value: "y" - label: "TH1 Connects to the device again" + PICS: PICS_SDK_CI_ONLY cluster: "DelayCommands" command: "WaitForCommissionee" arguments: @@ -231,6 +265,7 @@ tests: value: nodeId - label: "TH2 Connects to the device again" + PICS: PICS_SDK_CI_ONLY identity: "beta" cluster: "DelayCommands" command: "WaitForCommissionee" @@ -323,6 +358,22 @@ tests: - name: "expectedValue" value: "y" + - label: "TH2 writes Extension attibute value as empty list" + identity: "beta" + PICS: ACL.S.A0001 + command: "writeAttribute" + attribute: "Extension" + arguments: + value: [] + + - label: "TH2 writes ACL attribute value is an empty list" + identity: "beta" + PICS: ACL.S.A0000 + command: "writeAttribute" + attribute: "ACL" + arguments: + value: [] + - label: "Step 15:TH1 removes fabric F2 from DUT" PICS: OPCREDS.S.C0a.Rsp cluster: "Operational Credentials" @@ -381,3 +432,17 @@ tests: value: "Enter 'y' after success" - name: "expectedValue" value: "y" + + - label: "TH1 writes Extension attribute value as empty list" + PICS: ACL.S.A0001 + command: "writeAttribute" + attribute: "Extension" + arguments: + value: [] + + - label: "TH1 writes ACL attribute value is an empty list" + PICS: ACL.S.A0000 + command: "writeAttribute" + attribute: "ACL" + arguments: + value: [] diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml index 14f8bf734ef408..ab072552b44dc2 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_4.yaml @@ -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: 133.2.3. [TC-ACL-2.4] Extension attribute +name: 133.2.3. [TC-ACL-2.4] ACL attribute PICS: - ACL.S diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_7.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_7.yaml index 94a3afb028496b..08d07b038b61ff 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_7.yaml @@ -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: 133.2.3. [TC-ACL-2.7] Extension attribute +name: 133.2.3. [TC-ACL-2.7] Extension multi-fabric PICS: - ACL.S @@ -74,6 +74,7 @@ tests: cluster: "Administrator Commissioning" command: "OpenCommissioningWindow" timedInteractionTimeoutMs: 10000 + PICS: CADMIN.S.C00.Rsp && PICS_SDK_CI_ONLY arguments: values: - name: "CommissioningTimeout" @@ -87,7 +88,37 @@ tests: - name: "Salt" value: "SPAKE2P Key Salt" + - label: + "Step 3 & 4: TH1 puts DUT into commissioning mode, TH2 commissions DUT + using admin node ID N2" + verification: | + Open a commissioning window On TH1(Chiptool)using below command + + ./chip-tool pairing open-commissioning-window 1 1 400 2000 3841 + + [1657186324.710951][10820:10825] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 Status=0x0 + [1657186324.710980][10820:10825] CHIP:CTL: Successfully opened pairing window On TH(Chiptool)e device + [1657186324.711048][10820:10825] CHIP:CTL: Manual pairing code: [36253605617] + [1657186324.711108][10820:10825] CHIP:CTL: SetupQRCode: [MT:-24J0IRV01A7TB7E700] + + + Commission TH2(Chiptool) to DUT using manualcode generated in TH1 using open commission window + + ./chip-tool pairing code 2 36253605617 --commissioner-name beta --commissioner-nodeid 223344 + [1657186359.584672][3509:3514] CHIP:CTL: Successfully finished commissioning step 'Cleanup' + [1657186359.584743][3509:3514] CHIP:TOO: Device commissioning completed with success + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" + - label: "Waiting after opening commissioning window" + PICS: CADMIN.S.C00.Rsp && PICS_SDK_CI_ONLY cluster: "DelayCommands" command: "WaitForMs" arguments: @@ -97,6 +128,7 @@ tests: - label: "Step 4:TH2 starts a commissioning process with DUT" identity: "beta" + PICS: PICS_SDK_CI_ONLY cluster: "CommissionerCommands" command: "PairWithCode" arguments: @@ -108,6 +140,7 @@ tests: - label: "DUT is commissioned by TH2 on Fabric ID2 " identity: "beta" + PICS: PICS_SDK_CI_ONLY cluster: "DelayCommands" command: "WaitForCommissionee" arguments: @@ -204,3 +237,18 @@ tests: { Data: D_OK_SINGLE, FabricIndex: TH2FabricIndex }, FabricIndex: TH2FabricIndex, } + + - label: "TH1 writes Extension attribute value as empty list" + PICS: ACL.S.A0001 + command: "writeAttribute" + attribute: "Extension" + arguments: + value: [] + + - label: "TH2 writes Extension attribute value as empty list" + identity: "beta" + PICS: ACL.S.A0001 + command: "writeAttribute" + attribute: "Extension" + arguments: + value: [] diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_8.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_8.yaml index 7958e8a794d15f..daaa3e93f54ee3 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_8.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_8.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 133.2.3. [TC-ACL-2.8] Extension attribute +name: 133.2.3. [TC-ACL-2.8] ACL multi-fabric PICS: - ACL.S @@ -63,6 +63,7 @@ tests: saveAs: TH1FabricIndex - label: "TH1 puts DUT into commissioning mode" + PICS: CADMIN.S.C00.Rsp && PICS_SDK_CI_ONLY cluster: "Administrator Commissioning" command: "OpenCommissioningWindow" timedInteractionTimeoutMs: 10000 @@ -80,6 +81,7 @@ tests: value: "SPAKE2P Key Salt" - label: "Waiting after opening commissioning window" + PICS: CADMIN.S.C00.Rsp && PICS_SDK_CI_ONLY cluster: "DelayCommands" command: "WaitForMs" arguments: @@ -87,7 +89,38 @@ tests: - name: "ms" value: waitAfterCommissioning + - label: + "TH1 puts DUT into commissioning mode, TH2 commissions DUT using admin + node ID N2" + verification: | + Open a commissioning window On TH1(Chiptool)using below command + + ./chip-tool pairing open-commissioning-window 1 1 400 2000 3841 + + [1657186324.710951][10820:10825] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 Status=0x0 + [1657186324.710980][10820:10825] CHIP:CTL: Successfully opened pairing window On TH(Chiptool)e device + [1657186324.711048][10820:10825] CHIP:CTL: Manual pairing code: [36253605617] + [1657186324.711108][10820:10825] CHIP:CTL: SetupQRCode: [MT:-24J0IRV01A7TB7E700] + + + Commission TH2(Chiptool) to DUT using manualcode generated in TH1 using open commission window + + ./chip-tool pairing code 2 36253605617 --commissioner-name beta --commissioner-nodeid 223344 + + [1657186359.584672][3509:3514] CHIP:CTL: Successfully finished commissioning step 'Cleanup' + [1657186359.584743][3509:3514] CHIP:TOO: Device commissioning completed with success + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" + - label: "TH2 starts a commissioning process with DUT" + PICS: PICS_SDK_CI_ONLY identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" @@ -99,6 +132,7 @@ tests: value: payload - label: "DUT is commissioned by TH2 on Fabric ID2 " + PICS: PICS_SDK_CI_ONLY identity: "beta" cluster: "DelayCommands" command: "WaitForCommissionee" @@ -303,3 +337,18 @@ tests: }, FabricIndex: TH2FabricIndex, } + + - label: "TH1 writes ACL attribute value is an empty list" + PICS: ACL.S.A0000 + command: "writeAttribute" + attribute: "ACL" + arguments: + value: [] + + - label: "TH2 writes ACL attribute value is an empty list" + identity: "beta" + PICS: ACL.S.A0000 + command: "writeAttribute" + attribute: "ACL" + arguments: + value: [] diff --git a/src/app/tests/suites/certification/Test_TC_ACL_2_9.yaml b/src/app/tests/suites/certification/Test_TC_ACL_2_9.yaml index fe777c13bfa78f..18ec33dcac50b2 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_2_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_2_9.yaml @@ -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: 133.2.3. [TC-ACL-2.9] Extension attribute +name: 133.2.3. [TC-ACL-2.9] Cluster Access PICS: - ACL.S @@ -165,3 +165,21 @@ tests: event: "AccessControlExtensionChanged" response: error: UNSUPPORTED_ACCESS + + - label: "Test cleanup: Reset Devices to factory defaults" + PICS: PICS_SDK_CI_ONLY + cluster: "SystemCommands" + command: "FactoryReset" + + - label: "Test cleanup: Reset Devices to factory defaults" + verification: | + Reset Devices to factory defaults + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP + arguments: + values: + - name: "message" + value: "Factory Reset the DUT and enter 'y' after success" + - name: "expectedValue" + value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_ACT_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_ACT_3_1.yaml similarity index 58% rename from src/app/tests/suites/certification/Test_TC_ACT_3_1_Simulated.yaml rename to src/app/tests/suites/certification/Test_TC_ACT_3_1.yaml index 4f60f1d947f669..26cdf351ae5f99 100644 --- a/src/app/tests/suites/certification/Test_TC_ACT_3_1_Simulated.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACT_3_1.yaml @@ -11,6 +11,7 @@ # 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: 77.2.3. [TC-ACT-3.1] GLobal attributes with client as DUT @@ -23,25 +24,368 @@ PICS: config: nodeId: 0x12344321 - cluster: "Actions" + cluster: "Basic Information" endpoint: 0 tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" + - label: "Note" + verification: | + For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. + disabled: true + + - label: + "DUT reads all supported mandatory attributes from TH one at a time in + a manufacturer specific order" + PICS: ACT.C.AM-READ + verification: | + ./chip-tool actions read action-list 1 1 + + Verify read command is received on TH(bridge-app) + + [1666945367.158532][5173:5173] CHIP:EM: Handling via exchange: 20857r, Delegate: 0xaaaadf4c9810 + [1666945367.158636][5173:5173] CHIP:IM: Received Read request + [1666945367.158862][5173:5173] CHIP:DMG: ReadRequestMessage = + [1666945367.158934][5173:5173] CHIP:DMG: { + [1666945367.158989][5173:5173] CHIP:DMG: AttributePathIBs = + [1666945367.159116][5173:5173] CHIP:DMG: [ + [1666945367.159185][5173:5173] CHIP:DMG: AttributePathIB = + [1666945367.159263][5173:5173] CHIP:DMG: { + [1666945367.159341][5173:5173] CHIP:DMG: Endpoint = 0x1, + [1666945367.159424][5173:5173] CHIP:DMG: Cluster = 0x25, + [1666945367.159511][5173:5173] CHIP:DMG: Attribute = 0x0000_0000, + [1666945367.159594][5173:5173] CHIP:DMG: } + [1666945367.159749][5173:5173] CHIP:DMG: + [1666945367.159824][5173:5173] CHIP:DMG: ], + [1666945367.159902][5173:5173] CHIP:DMG: + [1666945367.159970][5173:5173] CHIP:DMG: isFabricFiltered = true, + [1666945367.160034][5173:5173] CHIP:DMG: InteractionModelRevision = 1 + [1666945367.160093][5173:5173] CHIP:DMG: }, + [1666945367.160257][5173:5173] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666945367.160475][5173:5173] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666945367.160548][5173:5173] CHIP:DMG: Cluster 25, Attribute 0 is dirty + [1666945367.160603][5173:5173] CHIP:DMG: Reading attribute: Cluster=0x0000_0025 Endpoint=1 AttributeId=0x0000_0000 (expanded=0) + [1666945367.160671][5173:5173] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0025 e=1 p=v + [1666945367.160747][5173:5173] CHIP:DMG: AccessControl: allowed + [1666945367.160913][5173:5173] CHIP:DMG: Sending report (payload has 155 bytes)... + [1666945367.161498][5173:5173] CHIP:EM: <<< [E:20857r M:138028988 (Ack:169257953)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:05 (IM:ReportData) + [1666945367.161605][5173:5173] CHIP:IN: (S) Sending msg 138028988 on secure session with LSID: 20125 + [1666945367.162586][5173:5173] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%wlan0]:41321 | 138028988 | [Interaction Model (1) / Report Data (0x05) / Session = 29898 / Exchange = 20857] + [1666945367.162687][5173:5173] CHIP:DMG: Header Flags = + [1666945367.162775][5173:5173] CHIP:DMG: { + [1666945367.162866][5173:5173] CHIP:DMG: Exchange (0x06) = + [1666945367.162991][5173:5173] CHIP:DMG: { + [1666945367.163055][5173:5173] CHIP:DMG: AckMsg = 169257953 + [1666945367.163106][5173:5173] CHIP:DMG: NeedsAck = true + [1666945367.163159][5173:5173] CHIP:DMG: } + [1666945367.163232][5173:5173] CHIP:DMG: } + [1666945367.163286][5173:5173] CHIP:DMG: + [1666945367.163352][5173:5173] CHIP:DMG: Encrypted Payload (189 bytes) = + [1666945367.163408][5173:5173] CHIP:DMG: { + [1666945367.163462][5173:5173] CHIP:DMG: data = 00ca7400bc273a08f682a81496a23fa7dd61b20f79cf2f49c0212e2f84c9d79e55c7713849c017379eeaa97a5c2ee740db6d7cf82ccaab1489dde78617f353c9a4e96845f9d7daf859ffa37e0c1cca4c6c5b10810097f698bc15b96df2eb525180ea1ce652f7316488ae2d6f3eb729dd7c4cd07e5ba7f3a882dc4fb59ebb8996fc6da638112cb71948aee3f90dc6e00912fa34c8cb38e7b84a2f3535a86f49aa1c1ea65beea905ce4c6036e94445a7752d4cbd7b8e78375602b6ea2883 + [1666945367.163524][5173:5173] CHIP:DMG: buffer_ptr = 187651807708480 + [1666945367.163579][5173:5173] CHIP:DMG: } + [1666945367.163630][5173:5173] CHIP:DMG: + [1666945367.163907][5173:5173] CHIP:DMG: ReportDataMessage = + [1666945367.164035][5173:5173] CHIP:DMG: { + [1666945367.164094][5173:5173] CHIP:DMG: AttributeReportIBs = + [1666945367.164173][5173:5173] CHIP:DMG: [ + [1666945367.164236][5173:5173] CHIP:DMG: AttributeReportIB = + [1666945367.164326][5173:5173] CHIP:DMG: { + [1666945367.164395][5173:5173] CHIP:DMG: AttributeDataIB = + [1666945367.164474][5173:5173] CHIP:DMG: { + [1666945367.164642][5173:5173] CHIP:DMG: DataVersion = 0x291b69b6, + [1666945367.164729][5173:5173] CHIP:DMG: AttributePathIB = + [1666945367.164814][5173:5173] CHIP:DMG: { + [1666945367.164909][5173:5173] CHIP:DMG: Endpoint = 0x1, + [1666945367.165007][5173:5173] CHIP:DMG: Cluster = 0x25, + [1666945367.165099][5173:5173] CHIP:DMG: Attribute = 0x0000_0000, + [1666945367.165182][5173:5173] CHIP:DMG: } + [1666945367.165354][5173:5173] CHIP:DMG: + [1666945367.165431][5173:5173] CHIP:DMG: Data = [ + [1666945367.165514][5173:5173] CHIP:DMG: + [1666945367.165601][5173:5173] CHIP:DMG: ], + [1666945367.165681][5173:5173] CHIP:DMG: }, + [1666945367.165775][5173:5173] CHIP:DMG: + [1666945367.165840][5173:5173] CHIP:DMG: }, + [1666945367.165990][5173:5173] CHIP:DMG: + [1666945367.166055][5173:5173] CHIP:DMG: AttributeReportIB = + [1666945367.166151][5173:5173] CHIP:DMG: { + [1666945367.166223][5173:5173] CHIP:DMG: AttributeDataIB = + [1666945367.166303][5173:5173] CHIP:DMG: { + [1666945367.166379][5173:5173] CHIP:DMG: DataVersion = 0x291b69b6, + [1666945367.166529][5173:5173] CHIP:DMG: AttributePathIB = + [1666945367.166618][5173:5173] CHIP:DMG: { + [1666945367.166711][5173:5173] CHIP:DMG: Endpoint = 0x1, + [1666945367.166839][5173:5173] CHIP:DMG: Cluster = 0x25, + [1666945367.166932][5173:5173] CHIP:DMG: Attribute = 0x0000_0000, + [1666945367.167027][5173:5173] CHIP:DMG: ListIndex = Null, + [1666945367.167111][5173:5173] CHIP:DMG: } + [1666945367.167191][5173:5173] CHIP:DMG: + [1666945367.167273][5173:5173] CHIP:DMG: Data = + [1666945367.167356][5173:5173] CHIP:DMG: { + [1666945367.167451][5173:5173] CHIP:DMG: 0x0 = 4097, + [1666945367.167548][5173:5173] CHIP:DMG: 0x1 = "Room 1 On" (9 chars), + [1666945367.167647][5173:5173] CHIP:DMG: 0x2 = 3, + [1666945367.167744][5173:5173] CHIP:DMG: 0x3 = 57345, + [1666945367.167842][5173:5173] CHIP:DMG: 0x4 = 1, + [1666945367.167937][5173:5173] CHIP:DMG: 0x5 = 0, + [1666945367.168033][5173:5173] CHIP:DMG: }, + [1666945367.168119][5173:5173] CHIP:DMG: }, + [1666945367.168221][5173:5173] CHIP:DMG: + [1666945367.168291][5173:5173] CHIP:DMG: }, + [1666945367.168404][5173:5173] CHIP:DMG: + [1666945367.168467][5173:5173] CHIP:DMG: AttributeReportIB = + [1666945367.168564][5173:5173] CHIP:DMG: { + [1666945367.168639][5173:5173] CHIP:DMG: AttributeDataIB = + [1666945367.168726][5173:5173] CHIP:DMG: { + [1666945367.168817][5173:5173] CHIP:DMG: DataVersion = 0x291b69b6, + [1666945367.168905][5173:5173] CHIP:DMG: AttributePathIB = + [1666945367.168987][5173:5173] CHIP:DMG: { + [1666945367.169079][5173:5173] CHIP:DMG: Endpoint = 0x1, + [1666945367.169178][5173:5173] CHIP:DMG: Cluster = 0x25, + [1666945367.169275][5173:5173] CHIP:DMG: Attribute = 0x0000_0000, + [1666945367.169354][5173:5173] CHIP:DMG: ListIndex = Null, + [1666945367.169438][5173:5173] CHIP:DMG: } + [1666945367.169526][5173:5173] CHIP:DMG: + [1666945367.169608][5173:5173] CHIP:DMG: Data = + [1666945367.169691][5173:5173] CHIP:DMG: { + [1666945367.169786][5173:5173] CHIP:DMG: 0x0 = 4098, + [1666945367.169879][5173:5173] CHIP:DMG: 0x1 = "Turn On Room 2" (14 chars), + [1666945367.169978][5173:5173] CHIP:DMG: 0x2 = 3, + [1666945367.170073][5173:5173] CHIP:DMG: 0x3 = 57346, + [1666945367.170175][5173:5173] CHIP:DMG: 0x4 = 1, + [1666945367.170263][5173:5173] CHIP:DMG: 0x5 = 0, + [1666945367.170350][5173:5173] CHIP:DMG: }, + [1666945367.170428][5173:5173] CHIP:DMG: }, + [1666945367.170520][5173:5173] CHIP:DMG: + [1666945367.170590][5173:5173] CHIP:DMG: }, + [1666945367.170675][5173:5173] CHIP:DMG: + [1666945367.170829][5173:5173] CHIP:DMG: ], + + + ./chip-tool actions read endpoint-lists 1 1 + + Verify read command is received on TH(bride-app) + + [1666945437.484634][5173:5173] CHIP:EM: Handling via exchange: 4879r, Delegate: 0xaaaadf4c9810 + [1666945437.484729][5173:5173] CHIP:IM: Received Read request + [1666945437.484902][5173:5173] CHIP:DMG: ReadRequestMessage = + [1666945437.484967][5173:5173] CHIP:DMG: { + [1666945437.485022][5173:5173] CHIP:DMG: AttributePathIBs = + [1666945437.485103][5173:5173] CHIP:DMG: [ + [1666945437.485167][5173:5173] CHIP:DMG: AttributePathIB = + [1666945437.485238][5173:5173] CHIP:DMG: { + [1666945437.485305][5173:5173] CHIP:DMG: Endpoint = 0x1, + [1666945437.485386][5173:5173] CHIP:DMG: Cluster = 0x25, + [1666945437.485475][5173:5173] CHIP:DMG: Attribute = 0x0000_0001, + [1666945437.485551][5173:5173] CHIP:DMG: } + [1666945437.485628][5173:5173] CHIP:DMG: + [1666945437.485697][5173:5173] CHIP:DMG: ], + [1666945437.485773][5173:5173] CHIP:DMG: + [1666945437.485841][5173:5173] CHIP:DMG: isFabricFiltered = true, + [1666945437.485906][5173:5173] CHIP:DMG: InteractionModelRevision = 1 + [1666945437.485965][5173:5173] CHIP:DMG: }, + [1666945437.486127][5173:5173] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666945437.486351][5173:5173] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666945437.486422][5173:5173] CHIP:DMG: Cluster 25, Attribute 1 is dirty + [1666945437.486477][5173:5173] CHIP:DMG: Reading attribute: Cluster=0x0000_0025 Endpoint=1 AttributeId=0x0000_0001 (expanded=0) + [1666945437.486545][5173:5173] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0025 e=1 p=v + [1666945437.486622][5173:5173] CHIP:DMG: AccessControl: allowed + [1666945437.486922][5173:5173] CHIP:DMG: Sending report (payload has 138 bytes)... + [1666945437.487501][5173:5173] CHIP:EM: <<< [E:4879r M:228092302 (Ack:220207383)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:05 (IM:ReportData) + [1666945437.487607][5173:5173] CHIP:IN: (S) Sending msg 228092302 on secure session with LSID: 20126 + [1666945437.488295][5173:5173] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%eth0]:44532 | 228092302 | [Interaction Model (1) / Report Data (0x05) / Session = 18475 / Exchange = 4879] + [1666945437.488393][5173:5173] CHIP:DMG: Header Flags = + [1666945437.488448][5173:5173] CHIP:DMG: { + [1666945437.488533][5173:5173] CHIP:DMG: Exchange (0x06) = + [1666945437.488588][5173:5173] CHIP:DMG: { + [1666945437.488647][5173:5173] CHIP:DMG: AckMsg = 220207383 + [1666945437.488702][5173:5173] CHIP:DMG: NeedsAck = true + [1666945437.488911][5173:5173] CHIP:DMG: } + [1666945437.488991][5173:5173] CHIP:DMG: } + [1666945437.489045][5173:5173] CHIP:DMG: + [1666945437.489114][5173:5173] CHIP:DMG: Encrypted Payload (172 bytes) = + [1666945437.489169][5173:5173] CHIP:DMG: { + [1666945437.489223][5173:5173] CHIP:DMG: data = 002b48008e69980db4473372f0bcc327ccf4de048ef848bd7e60b97d32476b6255cab374f592ce745ef3fb63d634487ee27317694670159d0678c5a10d3ecdea960d23d4594ef782ee669adaa1ed67551d83f8a405a244d10289c259afdd53eb9c7d44df1cc2e789a3026c4823f42f6b73406145149d5a73fb8570235ec20d01a20e701488229264c892b7e0eec1f341e8dbb540d9abe16446555346f92e0ba09601aec3b7ad74802aa66379 + [1666945437.489446][5173:5173] CHIP:DMG: buffer_ptr = 187651807709184 + [1666945437.489504][5173:5173] CHIP:DMG: } + [1666945437.489555][5173:5173] CHIP:DMG: + [1666945437.489834][5173:5173] CHIP:DMG: ReportDataMessage = + [1666945437.489901][5173:5173] CHIP:DMG: { + [1666945437.489955][5173:5173] CHIP:DMG: AttributeReportIBs = + [1666945437.490039][5173:5173] CHIP:DMG: [ + [1666945437.490102][5173:5173] CHIP:DMG: AttributeReportIB = + [1666945437.490186][5173:5173] CHIP:DMG: { + [1666945437.490252][5173:5173] CHIP:DMG: AttributeDataIB = + [1666945437.490425][5173:5173] CHIP:DMG: { + [1666945437.490519][5173:5173] CHIP:DMG: DataVersion = 0x291b69b6, + [1666945437.490607][5173:5173] CHIP:DMG: AttributePathIB = + [1666945437.490693][5173:5173] CHIP:DMG: { + [1666945437.490828][5173:5173] CHIP:DMG: Endpoint = 0x1, + [1666945437.490922][5173:5173] CHIP:DMG: Cluster = 0x25, + [1666945437.491019][5173:5173] CHIP:DMG: Attribute = 0x0000_0001, + [1666945437.491106][5173:5173] CHIP:DMG: } + [1666945437.491346][5173:5173] CHIP:DMG: + [1666945437.491535][5173:5173] CHIP:DMG: Data = [ + [1666945437.491620][5173:5173] CHIP:DMG: + [1666945437.491712][5173:5173] CHIP:DMG: ], + [1666945437.491800][5173:5173] CHIP:DMG: }, + [1666945437.491889][5173:5173] CHIP:DMG: + [1666945437.492026][5173:5173] CHIP:DMG: }, + [1666945437.492133][5173:5173] CHIP:DMG: + [1666945437.492196][5173:5173] CHIP:DMG: AttributeReportIB = + [1666945437.492286][5173:5173] CHIP:DMG: { + [1666945437.492353][5173:5173] CHIP:DMG: AttributeDataIB = + [1666945437.492440][5173:5173] CHIP:DMG: { + [1666945437.492531][5173:5173] CHIP:DMG: DataVersion = 0x291b69b6, + [1666945437.492613][5173:5173] CHIP:DMG: AttributePathIB = + [1666945437.492695][5173:5173] CHIP:DMG: { + [1666945437.492845][5173:5173] CHIP:DMG: Endpoint = 0x1, + [1666945437.492941][5173:5173] CHIP:DMG: Cluster = 0x25, + [1666945437.493032][5173:5173] CHIP:DMG: Attribute = 0x0000_0001, + [1666945437.493128][5173:5173] CHIP:DMG: ListIndex = Null, + [1666945437.493334][5173:5173] CHIP:DMG: } + [1666945437.493424][5173:5173] CHIP:DMG: + [1666945437.493515][5173:5173] CHIP:DMG: Data = + [1666945437.493591][5173:5173] CHIP:DMG: { + [1666945437.493680][5173:5173] CHIP:DMG: 0x0 = 57345, + [1666945437.493767][5173:5173] CHIP:DMG: 0x1 = "Room 1" (6 chars), + [1666945437.493928][5173:5173] CHIP:DMG: 0x2 = 1, + [1666945437.494017][5173:5173] CHIP:DMG: 0x3 = [ + [1666945437.494113][5173:5173] CHIP:DMG: 10, 11, + [1666945437.494223][5173:5173] CHIP:DMG: ], + [1666945437.494307][5173:5173] CHIP:DMG: }, + [1666945437.494386][5173:5173] CHIP:DMG: }, + [1666945437.494530][5173:5173] CHIP:DMG: + [1666945437.494602][5173:5173] CHIP:DMG: }, + [1666945437.494714][5173:5173] CHIP:DMG: + [1666945437.494842][5173:5173] CHIP:DMG: AttributeReportIB = + [1666945437.494936][5173:5173] CHIP:DMG: { + [1666945437.495008][5173:5173] CHIP:DMG: AttributeDataIB = + [1666945437.495137][5173:5173] CHIP:DMG: { + [1666945437.495223][5173:5173] CHIP:DMG: DataVersion = 0x291b69b6, + [1666945437.495304][5173:5173] CHIP:DMG: AttributePathIB = + [1666945437.495388][5173:5173] CHIP:DMG: { + [1666945437.495474][5173:5173] CHIP:DMG: Endpoint = 0x1, + [1666945437.495562][5173:5173] CHIP:DMG: Cluster = 0x25, + [1666945437.495656][5173:5173] CHIP:DMG: Attribute = 0x0000_0001, + [1666945437.495816][5173:5173] CHIP:DMG: ListIndex = Null, + [1666945437.495902][5173:5173] CHIP:DMG: } + [1666945437.495991][5173:5173] CHIP:DMG: + [1666945437.496071][5173:5173] CHIP:DMG: Data = + [1666945437.496160][5173:5173] CHIP:DMG: { + [1666945437.496254][5173:5173] CHIP:DMG: 0x0 = 57346, + [1666945437.496355][5173:5173] CHIP:DMG: 0x1 = "Room 2" (6 chars), + [1666945437.496446][5173:5173] CHIP:DMG: 0x2 = 1, + [1666945437.496532][5173:5173] CHIP:DMG: 0x3 = [ + [1666945437.496618][5173:5173] CHIP:DMG: 12, 13, + [1666945437.496720][5173:5173] CHIP:DMG: ], + [1666945437.496800][5173:5173] CHIP:DMG: }, + [1666945437.496885][5173:5173] CHIP:DMG: }, + [1666945437.496978][5173:5173] CHIP:DMG: + [1666945437.497048][5173:5173] CHIP:DMG: }, + [1666945437.497138][5173:5173] CHIP:DMG: + [1666945437.497199][5173:5173] CHIP:DMG: ], + [1666945437.497310][5173:5173] CHIP:DMG: + disabled: true + + - label: + "DUT reads all supported optional attributes from TH one at a time in + a manufacturer specific order" + PICS: ACT.C.AM-READ + verification: | + Optional attibute + + ./chip-tool actions read setup-url 1 1 + + Verify read command is received on TH(bridge-app) - - label: "Read attribute: ActionList" - wait: "readAttribute" - attribute: "ActionList" + [1666945301.190302][5173:5173] CHIP:EM: Handling via exchange: 4369r, Delegate: 0xaaaadf4c9810 + [1666945301.190396][5173:5173] CHIP:IM: Received Read request + [1666945301.190565][5173:5173] CHIP:DMG: ReadRequestMessage = + [1666945301.190631][5173:5173] CHIP:DMG: { + [1666945301.190686][5173:5173] CHIP:DMG: AttributePathIBs = + [1666945301.190817][5173:5173] CHIP:DMG: [ + [1666945301.190881][5173:5173] CHIP:DMG: AttributePathIB = + [1666945301.190951][5173:5173] CHIP:DMG: { + [1666945301.191029][5173:5173] CHIP:DMG: Endpoint = 0x1, + [1666945301.191118][5173:5173] CHIP:DMG: Cluster = 0x25, + [1666945301.191206][5173:5173] CHIP:DMG: Attribute = 0x0000_0002, + [1666945301.191283][5173:5173] CHIP:DMG: } + [1666945301.191363][5173:5173] CHIP:DMG: + [1666945301.191434][5173:5173] CHIP:DMG: ], + [1666945301.191505][5173:5173] CHIP:DMG: + [1666945301.191577][5173:5173] CHIP:DMG: isFabricFiltered = true, + [1666945301.191642][5173:5173] CHIP:DMG: InteractionModelRevision = 1 + [1666945301.191702][5173:5173] CHIP:DMG: }, + [1666945301.191867][5173:5173] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666945301.192079][5173:5173] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666945301.192151][5173:5173] CHIP:DMG: Cluster 25, Attribute 2 is dirty + [1666945301.192206][5173:5173] CHIP:DMG: Reading attribute: Cluster=0x0000_0025 Endpoint=1 AttributeId=0x0000_0002 (expanded=0) + [1666945301.192274][5173:5173] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0025 e=1 p=v + [1666945301.192350][5173:5173] CHIP:DMG: AccessControl: allowed + [1666945301.192458][5173:5173] CHIP:DMG: Sending report (payload has 55 bytes)... + [1666945301.193143][5173:5173] CHIP:EM: <<< [E:4369r M:144965555 (Ack:237173199)] (S) Msg TX to 1:000000000001B669 [C7F7] --- Type 0001:05 (IM:ReportData) + [1666945301.193250][5173:5173] CHIP:IN: (S) Sending msg 144965555 on secure session with LSID: 20124 + [1666945301.193995][5173:5173] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%wlan0]:59128 | 144965555 | [Interaction Model (1) / Report Data (0x05) / Session = 3702 / Exchange = 4369] + [1666945301.194092][5173:5173] CHIP:DMG: Header Flags = + [1666945301.194147][5173:5173] CHIP:DMG: { + [1666945301.194235][5173:5173] CHIP:DMG: Exchange (0x06) = + [1666945301.194291][5173:5173] CHIP:DMG: { + [1666945301.194351][5173:5173] CHIP:DMG: AckMsg = 237173199 + [1666945301.194536][5173:5173] CHIP:DMG: NeedsAck = true + [1666945301.194592][5173:5173] CHIP:DMG: } + [1666945301.194664][5173:5173] CHIP:DMG: } + [1666945301.194792][5173:5173] CHIP:DMG: + [1666945301.194871][5173:5173] CHIP:DMG: Encrypted Payload (89 bytes) = + [1666945301.194928][5173:5173] CHIP:DMG: { + [1666945301.194984][5173:5173] CHIP:DMG: data = 00760e00b3ffa308dc0549ed44eb87f9fc42998dba79b53455a44534c7647c1a27d317b5a1ade641306f4e0cbbfb831b5107a83ecccdb64760f5472f9a9d727456f6a79cef4dc4bf1b58b1d761f2bcca469779b23faf2b984e + [1666945301.195042][5173:5173] CHIP:DMG: buffer_ptr = 187651807700816 + [1666945301.195090][5173:5173] CHIP:DMG: } + [1666945301.195141][5173:5173] CHIP:DMG: + [1666945301.195312][5173:5173] CHIP:DMG: ReportDataMessage = + [1666945301.195445][5173:5173] CHIP:DMG: { + [1666945301.195504][5173:5173] CHIP:DMG: AttributeReportIBs = + [1666945301.195582][5173:5173] CHIP:DMG: [ + [1666945301.195645][5173:5173] CHIP:DMG: AttributeReportIB = + [1666945301.195734][5173:5173] CHIP:DMG: { + [1666945301.195802][5173:5173] CHIP:DMG: AttributeDataIB = + [1666945301.195889][5173:5173] CHIP:DMG: { + [1666945301.195974][5173:5173] CHIP:DMG: DataVersion = 0x291b69b6, + [1666945301.196132][5173:5173] CHIP:DMG: AttributePathIB = + [1666945301.196224][5173:5173] CHIP:DMG: { + [1666945301.196312][5173:5173] CHIP:DMG: Endpoint = 0x1, + [1666945301.196403][5173:5173] CHIP:DMG: Cluster = 0x25, + [1666945301.196492][5173:5173] CHIP:DMG: Attribute = 0x0000_0002, + [1666945301.196576][5173:5173] CHIP:DMG: } + [1666945301.196727][5173:5173] CHIP:DMG: + [1666945301.196833][5173:5173] CHIP:DMG: Data = "https://example.com" (19 chars), + [1666945301.196914][5173:5173] CHIP:DMG: }, + [1666945301.197003][5173:5173] CHIP:DMG: + [1666945301.197073][5173:5173] CHIP:DMG: }, + [1666945301.197306][5173:5173] CHIP:DMG: + [1666945301.197372][5173:5173] CHIP:DMG: ], + [1666945301.197450][5173:5173] CHIP:DMG: + [1666945301.197514][5173:5173] CHIP:DMG: SuppressResponse = true, + [1666945301.197579][5173:5173] CHIP:DMG: InteractionModelRevision = 1 + [1666945301.197638][5173:5173] CHIP:DMG: } + disabled: true - - label: "Read attribute: EndpointLists" - wait: "readAttribute" - attribute: "EndpointLists" + - label: + "DUT writes a suitable value to all supported mandatory attributes on + the TH one at a time in a manufacturer specific order" + PICS: ACT.C.AM-WRITE + verification: | + This cluster doesn"t have any writable attributes + disabled: true - - label: "Read attribute: SetupURL" - wait: "readAttribute" - attribute: "SetupURL" + - label: + "DUT writes a suitable value to all supported optional attributes on + the TH one at a time in a manufacturer specific order" + PICS: ACT.C.AO-WRITE + verification: | + This cluster doesn"t have any writable attributes + disabled: true - label: "Configure TH such that it implements mandatory and none of the @@ -440,19 +784,12 @@ tests: [1666952448.532092][217377:217377] CHIP:DMG: InteractionModelRevision = 1 [1666952448.532111][217377:217377] CHIP:DMG: } [1666952448.532131][217377:217377] CHIP:DMG: - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" + disabled: true - label: "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order" + PICS: ACT.C.AO-READ verification: | Optional attibute @@ -533,27 +870,12 @@ tests: [1666952609.345771][217377:217377] CHIP:DMG: SuppressResponse = true, [1666952609.345792][217377:217377] CHIP:DMG: InteractionModelRevision = 1 [1666952609.345811][217377:217377] CHIP:DMG: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" + disabled: true - label: "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer specific order" + PICS: ACT.C.AO-WRITE verification: | This cluster doesn't have any writable attributes - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_ALOGIN_12_1.yaml b/src/app/tests/suites/certification/Test_TC_ALOGIN_12_1.yaml index 2e15f2c8b83448..5fdc92abd20fb8 100644 --- a/src/app/tests/suites/certification/Test_TC_ALOGIN_12_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ALOGIN_12_1.yaml @@ -20,77 +20,80 @@ PICS: config: nodeId: 0x12344321 - cluster: "Account Login" - endpoint: 3 - TempAccountIdentifier: - type: char_string - defaultValue: "1111" - catalogVendorId: - type: int16u - defaultValue: 123 - applicationId: - type: char_string - defaultValue: "exampleid" + cluster: "BasicInformation" + endpoint: 0 tests: - - label: "Wait for the commissioned device to be retrieved" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId + - label: + "Make sure there is a Content App endpoint implementing the Account + Login cluster. Product maker may provide pre-setup steps" + 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). + + The following command on the example tv-app will launch a content app on endpoint 4: + ./chip-tool applicationlauncher launch-app "{"catalogVendorID": 123, "applicationID": "exampleid"}" 1 1 + ./chip-tv-casting-app applicationlauncher launch-app "{"catalogVendorID": 123, "applicationID": "exampleid"}" 1 1 - - label: "Launch an app with the provided a application ID" - PICS: APPLAUNCHER.S.C00.Rsp - cluster: "Application Launcher" - command: "LaunchApp" - arguments: - values: - - name: "Data" - value: "Hello World" - - name: "Application" - value: - { - CatalogVendorID: catalogVendorId, - ApplicationID: applicationId, - } - response: - values: - - name: "Status" - value: 0 + Verify in TH Log: + [1666779476.134292][24912:24917] CHIP:DMG: }, + [1666779476.134332][24912:24917] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_050C Command=0x0000_0003 + [1666779476.134353][24912:24917] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_050C Command 0x0000_0003 + [1666779476.134380][24912:24917] CHIP:TOO: LauncherResponse: { + [1666779476.134392][24912:24917] CHIP:TOO: status: 0 + [1666779476.134409][24912:24917] CHIP:TOO: data: 64617461 + [1666779476.134415][24912:24917] CHIP:TOO: } + [1666779476.134434][24912:24917] CHIP:DMG: ICR moving to [AwaitingDe] + [1666779476.134475][24912:24917] CHIP:EM: <<< [E:15131i M:169249733 (Ack:166780493)] (S) Msg TX to 1:0000000000000001 [F894] --- Type 0000:10 (SecureChannel:StandaloneAck) + disabled: true - label: "TH sends a GetSetupPIN command to the DUT with test values provided by the product maker." PICS: ALOGIN.S.C00.Rsp - command: "GetSetupPIN" - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "TempAccountIdentifier" - value: TempAccountIdentifier - response: - values: - - name: "SetupPIN" - saveAs: setupPIN + 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 accountlogin get-setup-pin 1111 1 4 --timedInteractionTimeoutMs 1000 + ./chip-tv-casting-app accountlogin get-setup-pin 1111 1 4 --timedInteractionTimeoutMs 1000 + + On TH Verify that the DUT responds with a valid GetSetupPINResponse. + [1666779483.473668][24918:24923] CHIP:DMG: Received Command Response Data, Endpoint=4 Cluster=0x0000_050E Command=0x0000_0001 + [1666779483.473688][24918:24923] CHIP:TOO: Endpoint: 4 Cluster: 0x0000_050E Command 0x0000_0001 + [1666779483.473709][24918:24923] CHIP:TOO: GetSetupPINResponse: { + [1666779483.473716][24918:24923] CHIP:TOO: setupPIN: 34567890 + [1666779483.473724][24918:24923] CHIP:TOO: } + [1666779483.473741][24918:24923] CHIP:DMG: ICR moving to [AwaitingDe] + [1666779483.473781][24918:24923] CHIP:EM: <<< [E:55844i M:50959985 (Ack:76245781)] (S) Msg TX to 1:0000000000000001 [F894] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1666779483.473794][24918:24923] CHIP:IN: (S) Sending msg 50959985 on secure session with LSID: 53816 + disabled: true - label: "TH sends a Login command to the DUT with test values provided by the product maker." PICS: ALOGIN.S.C02.Rsp - command: "Login" - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "TempAccountIdentifier" - value: TempAccountIdentifier - - name: "SetupPIN" - value: setupPIN + 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 accountlogin login 11111 34567890 1 4 --timedInteractionTimeoutMs 1000 + ./chip-tv-casting-app accountlogin login 11111 34567890 1 4 --timedInteractionTimeoutMs 1000 + + On TH Verify that the DUT responds with a standard command response. + [1666779572.083273][24925:24930] CHIP:DMG: }, + [1666779572.083314][24925:24930] CHIP:DMG: Received Command Response Status for Endpoint=4 Cluster=0x0000_050E Command=0x0000_0002 Status=0x0 + [1666779572.083337][24925:24930] CHIP:DMG: ICR moving to [AwaitingDe] + [1666779572.083380][24925:24930] CHIP:EM: <<< [E:20581i M:225012920 (Ack:11041406)] (S) Msg TX to 1:0000000000000001 [F894] --- Type 0000:10 (SecureChannel:StandaloneAck) + disabled: true - label: "TH sends a Logout command to the DUT with test values provided by the product maker." PICS: ALOGIN.S.C03.Rsp - command: "Logout" - timedInteractionTimeoutMs: 10000 + 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 accountlogin logout 1 4 --timedInteractionTimeoutMs 1000 + ./chip-tv-casting-app accountlogin logout 1 4 --timedInteractionTimeoutMs 1000 + + On TH Verify that the DUT responds with a standard command response. + [1666779601.381050][24938:24943] CHIP:DMG: }, + [1666779601.381090][24938:24943] CHIP:DMG: Received Command Response Status for Endpoint=4 Cluster=0x0000_050E Command=0x0000_0003 Status=0x0 + [1666779601.381112][24938:24943] CHIP:DMG: ICR moving to [AwaitingDe] + [1666779601.381158][24938:24943] CHIP:EM: <<< [E:54914i M:17706756 (Ack:83004508)] (S) Msg TX to 1:0000000000000001 [F894] --- Type 0000:10 (SecureChannel:StandaloneAck) + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_BIND_2_1.yaml b/src/app/tests/suites/certification/Test_TC_BIND_2_1.yaml index 344f6b90fe40bf..631d4c89ac6337 100644 --- a/src/app/tests/suites/certification/Test_TC_BIND_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BIND_2_1.yaml @@ -231,14 +231,14 @@ tests: verification: | ./chip-tool onoff read on-off 2 1 - Verify on TH2 (Chip-tool),the onoff value is set to ON + Verify on TH1 (Chip-tool),the onoff value is set to ON [1657798291.396477][3835:3841] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 4260513117 [1657798291.396514][3835:3841] CHIP:TOO: OnOff: TRUE ./chip-tool onoff read on-off 3 2 - Verify on TH3 (Chip-tool) ,the onoff value is set to ON + Verify on TH1 (Chip-tool) ,the onoff value is set to ON [1657798691.194894][3869:3874] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 470320746 [1657798691.194948][3869:3874] CHIP:TOO: OnOff: TRUE @@ -352,7 +352,7 @@ tests: verification: | ./chip-tool onoff read on-off 2 1 - Verify on TH2 (Chip-tool),the onoff value is set to OFF + Verify on TH1 (Chip-tool),the onoff value is set to OFF [1657803168.769564][4272:4277] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 1968648540 @@ -364,7 +364,7 @@ tests: verification: | ./chip-tool onoff read on-off 3 2 - Verify on TH3 (Chip-tool) ,the onoff value is set to ON + Verify on TH1 (Chip-tool) ,the onoff value is set to ON [1657803609.731464][4333:4339] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 3914456390 diff --git a/src/app/tests/suites/certification/Test_TC_BIND_2_3.yaml b/src/app/tests/suites/certification/Test_TC_BIND_2_3.yaml index c6b9bd69fcedb0..bd8ead4aeb4893 100644 --- a/src/app/tests/suites/certification/Test_TC_BIND_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_BIND_2_3.yaml @@ -74,7 +74,7 @@ tests: [1659104612.592373][62366:62371] CHIP:DMG: SuppressResponse = true, [1659104612.592399][62366:62371] CHIP:DMG: InteractionModelRevision = 1 [1659104612.592432][62366:62371] CHIP:DMG: } - [1659104612.593187][62366:62371] CHIP:CTL: Successfully finished commissioning step "ReadCommissioningInfo" + [1659104612.593187][62366:62371] CHIP:CTL: Successfully finished commissioning step 'ReadCommissioningInfo' disabled: true - label: @@ -91,11 +91,11 @@ tests: Run this cmmd for [ nRF52840-DK ]Thread device in chip-tool: - ./chip-tool groupkeymanagement key-set-write "{"groupKeySetID": 42, + ./chip-tool groupkeymanagement key-set-write '{"groupKeySetID": 42, "groupKeySecurityPolicy": 0, "epochKey0": "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 2220000,"epochKey1": "d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 2220001,"epochKey2": - "d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }" 74 0 + "d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }' 74 0 On TH1(Chip-tool), Verify the success response for KeySetWrite @@ -131,11 +131,11 @@ tests: Run this cmmd for lighting app in chip-tool: - ./chip-tool groupkeymanagement key-set-write "{"groupKeySetID": 42, + ./chip-tool groupkeymanagement key-set-write '{"groupKeySetID": 42, "groupKeySecurityPolicy": 0, "epochKey0": "d0d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime0": 2220000,"epochKey1": "d1d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime1": 2220001,"epochKey2": - "d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }" 2 0 + "d2d1d2d3d4d5d6d7d8d9dadbdcdddedf", "epochStartTime2": 2220002 }' 2 0 [1657719041.076036][4541:4546] CHIP:DMG: } On TH1, Verify the success response for KeySetWrite @@ -149,7 +149,7 @@ tests: verification: | Run this cmmd for [ nRF52840-DK ]Thread device in chip-tool: - ./chip-tool groupkeymanagement write group-key-map "[{"groupId": 1, "groupKeySetID": 42, "fabricIndex": 1}]" 74 0 + ./chip-tool groupkeymanagement write group-key-map '[{"groupId": 1, "groupKeySetID": 42, "fabricIndex": 1}]' 74 0 On TH1(Chip-tool), Verify the success response for GroupKeySetID @@ -160,7 +160,7 @@ tests: [1657719130.464342][4557:4562] CHIP:DMG: Run this cmmd for lighting app in chip-tool: - ./chip-tool groupkeymanagement write group-key-map "[{"groupId": 1, "groupKeySetID": 42, "fabricIndex": 1}]" 2 0 + ./chip-tool groupkeymanagement write group-key-map '[{"groupId": 1, "groupKeySetID": 42, "fabricIndex": 1}]' 2 0 On TH1(Chip-tool), Verify the success response for GroupKeySetID @@ -230,7 +230,7 @@ tests: Run this cmmd for [ nRF52840-DK ]Thread device in chip-tool: - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null },{"fabricIndex": 1, "privilege": 4, "authMode": 3, "subjects": [1], "targets": null }]" 74 0 + ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null },{"fabricIndex": 1, "privilege": 4, "authMode": 3, "subjects": [1], "targets": null }]' 74 0 On TH1(Chip-tool), Verify the success response for Acl: @@ -240,7 +240,7 @@ tests: Run this cmmd for lighting app in chip-tool: - ./chip-tool accesscontrol write acl "[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null },{"fabricIndex": 1, "privilege": 4, "authMode": 3, "subjects": [1], "targets": null }]" 2 0 + ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null },{"fabricIndex": 1, "privilege": 4, "authMode": 3, "subjects": [1], "targets": null }]' 2 0 On TH1(Chip-tool), Verify the success response for Acl: @@ -251,7 +251,7 @@ tests: Run this cmmd for [ nRF52840-DK ]Thread device in chip-tool: - ./chip-tool binding write binding "[{"group" : "0x0001"}]" 74 1 + ./chip-tool binding write binding '[{"group" : "0x0001"}]' 74 1 On TH1(Chip-tool), Verify the success response for binding entry @@ -281,7 +281,7 @@ tests: ./chip-tool onoff read on-off 2 1 - On TH(Chip-tool), Verify the onoff value is set to ON + On TH1(Chip-tool), Verify the onoff value is set to ON [1657719363.799344][4615:4620] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0006 Attribute 0x0000_0000 DataVersion: 3526720174 [1657719363.799380][4615:4620] CHIP:TOO: OnOff: TRUE @@ -291,7 +291,7 @@ tests: verification: | Run this cmmd for [ nRF52840-DK ]Thread device in chip-tool: - ./chip-tool binding write binding "[]" 74 1 + ./chip-tool binding write binding '[]' 74 1 On TH1(Chip-tool), Verify the success response for removing binding entry diff --git a/src/app/tests/suites/certification/Test_TC_BOOL_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_BOOL_3_1.yaml similarity index 74% rename from src/app/tests/suites/certification/Test_TC_BOOL_3_1_Simulated.yaml rename to src/app/tests/suites/certification/Test_TC_BOOL_3_1.yaml index ccf94d4de452b6..4d78a3bbbc7d5e 100644 --- a/src/app/tests/suites/certification/Test_TC_BOOL_3_1_Simulated.yaml +++ b/src/app/tests/suites/certification/Test_TC_BOOL_3_1.yaml @@ -11,6 +11,7 @@ # 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: 68.3.1. [TC-BOOL-3.1] Attributes with Client as DUT @@ -23,17 +24,131 @@ PICS: config: nodeId: 0x12344321 - cluster: "Boolean State" + cluster: "Basic Information" endpoint: 0 tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" + - label: "Note" + verification: | + For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. + disabled: true + + - label: "Preconditions" + verification: | + Validate these PICS items of attributes which are not allowed in this server cluster implementation - these PICS items should all be FALSE, if any of them is TRUE then FAIL the test + + BRBINFO.S.A0000(DataModelRevision) + + BRBINFO.S.A0004(ProductID) + + BRBINFO.S.A0006(Location) + + BRBINFO.S.A0010(LocalConfigDisabled) + + BRBINFO.S.A0013(CapabilityMinima) + disabled: true + - label: + "DUT reads all supported mandatory attributes from TH one at a time in + a manufacturer specific order" + PICS: BOOL.C.AM-READ + verification: | + ./chip-tool booleanstate read state-value 1 1 + + Verify read command is received on TH(all-clusters-app) Log successfully + + [1666174663.263846][21481:21481] CHIP:EM: Handling via exchange: 63626r, Delegate: 0xaaaadc070288 + [1666174663.264067][21481:21481] CHIP:IM: Received Read request + [1666174663.264274][21481:21481] CHIP:DMG: ReadRequestMessage = + [1666174663.264361][21481:21481] CHIP:DMG: { + [1666174663.264417][21481:21481] CHIP:DMG: AttributePathIBs = + [1666174663.264482][21481:21481] CHIP:DMG: [ + [1666174663.264565][21481:21481] CHIP:DMG: AttributePathIB = + [1666174663.264645][21481:21481] CHIP:DMG: { + [1666174663.264748][21481:21481] CHIP:DMG: Endpoint = 0x1, + [1666174663.264841][21481:21481] CHIP:DMG: Cluster = 0x45, + [1666174663.264949][21481:21481] CHIP:DMG: Attribute = 0x0000_0000, + [1666174663.265057][21481:21481] CHIP:DMG: } + [1666174663.265138][21481:21481] CHIP:DMG: + [1666174663.265204][21481:21481] CHIP:DMG: ], + [1666174663.265298][21481:21481] CHIP:DMG: + [1666174663.265369][21481:21481] CHIP:DMG: isFabricFiltered = true, + [1666174663.265459][21481:21481] CHIP:DMG: InteractionModelRevision = 1 + [1666174663.265520][21481:21481] CHIP:DMG: }, + [1666174663.265714][21481:21481] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666174663.265995][21481:21481] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666174663.266093][21481:21481] CHIP:DMG: Cluster 45, Attribute 0 is dirty + [1666174663.266147][21481:21481] CHIP:DMG: Reading attribute: Cluster=0x0000_0045 Endpoint=1 AttributeId=0x0000_0000 (expanded=0) + [1666174663.266215][21481:21481] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0045 e=1 p=v + [1666174663.266319][21481:21481] CHIP:DMG: AccessControl: allowed + [1666174663.266439][21481:21481] CHIP:DMG: Sending report (payload has 35 bytes)... + [1666174663.267067][21481:21481] CHIP:EM: <<< [E:63626r M:36969602 (Ack:764247)] (S) Msg TX to 1:000000000001B669 [A7EF] --- Type 0001:05 (IM:ReportData) + [1666174663.267172][21481:21481] CHIP:IN: (S) Sending msg 36969602 on secure session with LSID: 53667 + [1666174663.267928][21481:21481] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%wlan0]:42580 | 36969602 | [Interaction Model (1) / Report Data (0x05) / Session = 58403 / Exchange = 63626] + [1666174663.268026][21481:21481] CHIP:DMG: Header Flags = + [1666174663.268086][21481:21481] CHIP:DMG: { + [1666174663.268175][21481:21481] CHIP:DMG: Exchange (0x06) = + [1666174663.268236][21481:21481] CHIP:DMG: { + [1666174663.268297][21481:21481] CHIP:DMG: AckMsg = 764247 + [1666174663.268352][21481:21481] CHIP:DMG: NeedsAck = true + [1666174663.268408][21481:21481] CHIP:DMG: } + [1666174663.268480][21481:21481] CHIP:DMG: } + [1666174663.268563][21481:21481] CHIP:DMG: + [1666174663.268634][21481:21481] CHIP:DMG: Encrypted Payload (69 bytes) = + [1666174663.268713][21481:21481] CHIP:DMG: { + [1666174663.268770][21481:21481] CHIP:DMG: data = 0023e400821c3402f21cc23126fb0db5a6a36a83d08fcf829d2e297fe7b97436aef3fcc3ebd2ceeeb3a2f101565fadaba18478940bba170ec79c8b64086d7e667b3eedd06c + [1666174663.268828][21481:21481] CHIP:DMG: buffer_ptr = 187651145559328 + [1666174663.268900][21481:21481] CHIP:DMG: } + [1666174663.268954][21481:21481] CHIP:DMG: + [1666174663.269143][21481:21481] CHIP:DMG: ReportDataMessage = + [1666174663.269211][21481:21481] CHIP:DMG: { + [1666174663.269294][21481:21481] CHIP:DMG: AttributeReportIBs = + [1666174663.269375][21481:21481] CHIP:DMG: [ + [1666174663.269437][21481:21481] CHIP:DMG: AttributeReportIB = + [1666174663.269512][21481:21481] CHIP:DMG: { + [1666174663.269584][21481:21481] CHIP:DMG: AttributeDataIB = + [1666174663.269697][21481:21481] CHIP:DMG: { + [1666174663.269794][21481:21481] CHIP:DMG: DataVersion = 0x88a29de9, + [1666174663.269947][21481:21481] CHIP:DMG: AttributePathIB = + [1666174663.270041][21481:21481] CHIP:DMG: { + [1666174663.270148][21481:21481] CHIP:DMG: Endpoint = 0x1, + [1666174663.270244][21481:21481] CHIP:DMG: Cluster = 0x45, + [1666174663.270341][21481:21481] CHIP:DMG: Attribute = 0x0000_0000, + [1666174663.270454][21481:21481] CHIP:DMG: } + [1666174663.270559][21481:21481] CHIP:DMG: + [1666174663.270656][21481:21481] CHIP:DMG: Data = false, + [1666174663.270762][21481:21481] CHIP:DMG: }, + [1666174663.270860][21481:21481] CHIP:DMG: + [1666174663.270968][21481:21481] CHIP:DMG: }, + [1666174663.271054][21481:21481] CHIP:DMG: + [1666174663.271140][21481:21481] CHIP:DMG: ], + [1666174663.271219][21481:21481] CHIP:DMG: + [1666174663.271310][21481:21481] CHIP:DMG: SuppressResponse = true, + [1666174663.271375][21481:21481] CHIP:DMG: InteractionModelRevision = 1 + disabled: true - - label: "Read attribute: StateValue" - wait: "readAttribute" - attribute: "StateValue" + - label: + "DUT reads all supported optional attributes from TH one at a time in + a manufacturer specific order" + PICS: BOOL.C.AM-READ + verification: | + This cluster doesn"t have any optional attribute + disabled: true + + - label: + "DUT writes a suitable value to all supported mandatory attributes on + the TH one at a time in a manufacturer specific order" + PICS: BOOL.C.AM-WRITE + verification: | + This cluster doesn"t have any writable attributes + disabled: true + + - label: + "DUT writes a suitable value to all supported optional attributes on + the TH one at a time in a manufacturer specific order" + PICS: BOOL.C.AO-WRITE + verification: | + This cluster doesn"t have any writable attributes + disabled: true - label: "Configure TH such that it implements mandatory and none of the @@ -245,7 +360,7 @@ tests: [1665059548.746728][9263:9263] CHIP:DMG: }, - ./chip-tool booleanstate read state-value 1 1 + ./chip-tool booleanstate read state-value 1 1 Verify read command is received on TH (all-clusters-minimal-app) Log @@ -314,42 +429,20 @@ tests: [1666174757.467505][21506:21506] CHIP:DMG: }, [1666174757.467582][21506:21506] CHIP:DMG: [1666174757.467643][21506:21506] CHIP:DMG: ], - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" + disabled: true - label: "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order" + PICS: BOOL.C.AO-READ verification: | - This cluster doesn't have any optional attribute - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" + This cluster doesn"t have any optional attribute + disabled: true - label: "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer specific order" + PICS: BOOL.C.AO-WRITE verification: | - This cluster doesn't have any writable attributes - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" + This cluster doesn"t have any optional attribute + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_BRBINFO_1_1.yaml b/src/app/tests/suites/certification/Test_TC_BRBINFO_1_1.yaml index 0ce8cfd2aa1e26..b1e3e2e9265c39 100644 --- a/src/app/tests/suites/certification/Test_TC_BRBINFO_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BRBINFO_1_1.yaml @@ -22,197 +22,102 @@ PICS: config: nodeId: 0x12344321 - cluster: "Bridged Device Basic Information" - endpoint: 3 + cluster: "Basic Information" + endpoint: 0 tests: - - label: "Wait for the commissioned device to be retrieved" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId + - label: "Preconditions" + verification: | + Validate these PICS items of attributes which are not allowed in this server cluster implementation - these PICS items should all be FALSE, if any of them is TRUE then FAIL the test + + BRBINFO.S.A0000(DataModelRevision) + + BRBINFO.S.A0004(ProductID) + + BRBINFO.S.A0006(Location) + + BRBINFO.S.A0010(LocalConfigDisabled) + + BRBINFO.S.A0013(CapabilityMinima) + disabled: true + + - label: "Commission DUT to TH (if not already done)" + verification: | + + disabled: true - label: "TH reads the ClusterRevision from DUT" - command: "readAttribute" - attribute: "ClusterRevision" - response: - value: 1 - constraints: - type: int16u + PICS: "" + verification: | + ./chip-tool bridgeddevicebasicinformation read cluster-revision 1 3 + + On TH(chip-tool), verify DUT responsds ClusterRevision attribute has value 1 + + [1657695910.794487][15411:15416] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_0039 Attribute 0x0000_FFFD DataVersion: 2577979325 + [1657695910.794568][15411:15416] CHIP:TOO: ClusterRevision: 1 + disabled: true - label: "TH reads the FeatureMap from DUT" - command: "readAttribute" - attribute: "FeatureMap" - response: - value: 0 - constraints: - type: bitmap32 + + verification: | + ./chip-tool bridgeddevicebasicinformation read feature-map 1 3 + + On TH(chip-tool), verify DUT responds Featuremap value as 0 + + [1658749277.166884][10254:10259] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_0039 Attribute 0x0000_FFFC DataVersion: 3297319126 + [1658749277.166945][10254:10259] CHIP:TOO: FeatureMap: 0 + [1658749277.167033][10254:10259] CHIP:EM: Sending Standalone Ack for MessageCounter:190389852 on exchange 39565i + disabled: true - label: "TH reads AttributeList from DUT" - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [17, 65528, 65529, 65531, 65532, 65533] - - - label: "TH reads optional attribute(VendorName) in AttributeList" - PICS: BRBINFO.S.A0001 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [1] - - - label: "TH reads optional attribute(VendorID) in AttributeList" - PICS: BRBINFO.S.A0002 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [2] - - - label: "TH reads optional attribute(ProductName) in AttributeList" - PICS: BRBINFO.S.A0003 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [3] - - - label: "TH reads optional attribute(NodeLabel) in AttributeList" - PICS: BRBINFO.S.A0005 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [5] - - - label: "TH reads optional attribute(HardwareVersion) in AttributeList" - PICS: BRBINFO.S.A0007 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [7] - - - label: - "TH reads optional attribute(HardwareVersionString) in AttributeList" - PICS: BRBINFO.S.A0008 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [8] - - - label: "TH reads optional attribute(SoftwareVersion) in AttributeList" - PICS: BRBINFO.S.A0009 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [9] - - - label: - "TH reads optional attribute(SoftwareVersionString) in AttributeList" - PICS: BRBINFO.S.A000a - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [10] - - - label: "TH reads optional attribute(ManufacturingDate) in AttributeList" - PICS: BRBINFO.S.A000b - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [11] - - - label: "TH reads optional attribute(PartNumber) in AttributeList" - PICS: BRBINFO.S.A000c - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [12] - - - label: "TH reads optional attribute(ProductURL) in AttributeList" - PICS: BRBINFO.S.A000d - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [13] - - - label: "TH reads optional attribute(ProductLabel) in AttributeList" - PICS: BRBINFO.S.A000e - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [14] - - - label: "TH reads optional attribute(SerialNumber) in AttributeList" - PICS: BRBINFO.S.A000f - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [15] - - - label: "TH reads optional attribute(UniqueID) in AttributeList" - PICS: BRBINFO.S.A0012 - command: "readAttribute" - attribute: "AttributeList" - response: - constraints: - type: list - contains: [18] - - - label: "TH1 reads AcceptedCommandList from DUT" - command: "readAttribute" - attribute: "AcceptedCommandList" - response: - value: [] - constraints: - type: list - - - label: "TH1 reads GeneratedCommandList from DUT" - command: "readAttribute" - attribute: "GeneratedCommandList" - response: - value: [] - constraints: - type: list - #Commenting out the step EventList attribute which is out of scope for matter V1.0 - #- label: - # "Read EventList attribute from the DUT and Verify that the DUT - # response provides a list of supported events." - # verification: | - # Not implemented in chip-tool - # cluster: "LogCommands" - # command: "UserPrompt" - # PICS: PICS_USER_PROMPT - # arguments: - # values: - # - name: "message" - # value: "Please enter 'y' for success" - # - name: "expectedValue" - # value: "y" + + verification: | + ./chip-tool bridgeddevicebasicinformation read attribute-list 1 3 + + Verify " AttributeList "should include the mandatory attributes (value 17) and if DUT supports it lists optional attribute (values 1, 2, 3, 5, 7, 8, 9, 10, 11, 12, 13, 14, 15, 18 ) and global attributes (value 65533, 65532, 65531, 65530, 65529 and 65528) on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + + [1676277997.061046][3751:3753] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_0039 Attribute 0x0000_FFFB DataVersion: 1860081282 + [1676277997.061134][3751:3753] CHIP:TOO: AttributeList: 8 entries + [1676277997.061192][3751:3753] CHIP:TOO: [1]: 5 + [1676277997.061220][3751:3753] CHIP:TOO: [2]: 17 + [1676277997.061245][3751:3753] CHIP:TOO: [3]: 65528 + [1676277997.061274][3751:3753] CHIP:TOO: [4]: 65529 + [1676277997.061306][3751:3753] CHIP:TOO: [5]: 65530 + [1676277997.061337][3751:3753] CHIP:TOO: [6]: 65531 + [1676277997.061367][3751:3753] CHIP:TOO: [7]: 65532 + [1676277997.061399][3751:3753] CHIP:TOO: [8]: 65533 + disabled: true + + - label: "TH reads EventList from DUT" + + verification: | + ./chip-tool bridgeddevicebasicinformation read event-list 1 3 + + On TH(chip-tool), Verify that DUT response contains list of supported events, for this cluster the list is empty(0 enties) + + 1676439985.362352][22002:22004] CHIP:DMG: } + [1676439985.362396][22002:22004] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_0039 Attribute 0x0000_FFFA DataVersion: 266846256 + [1676439985.362407][22002:22004] CHIP:TOO: EventList: 0 entries + disabled: true + + - label: "TH reads AcceptedCommandList from DUT" + + verification: | + ./chip-tool bridgeddevicebasicinformation read accepted-command-list 1 3 + + On TH(chip-tool), verify DUT responds as list of Accepted Commands as 0 entries + + [1657696300.165081][15447:15452] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_0039 Attribute 0x0000_FFF9 DataVersion: 2577979325 + [1657696300.165174][15447:15452] CHIP:TOO: AcceptedCommandList: 0 entries + disabled: true + + - label: "TH reads GeneratedCommandList from DUT" + + verification: | + ./chip-tool bridgeddevicebasicinformation read generated-command-list 1 3 + + On TH(chip-tool), verify that DUT responds as list of GeneratedCommands as 0 entries + + [1657696328.889936][15454:15459] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_0039 Attribute 0x0000_FFF8 DataVersion: 2577979325 + [1657696328.890017][15454:15459] CHIP:TOO: GeneratedCommandList: 0 entries + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_BRBINFO_2_1.yaml b/src/app/tests/suites/certification/Test_TC_BRBINFO_2_1.yaml index eab05599ed5d52..35a8f0b2ea658e 100644 --- a/src/app/tests/suites/certification/Test_TC_BRBINFO_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BRBINFO_2_1.yaml @@ -20,126 +20,125 @@ PICS: config: nodeId: 0x12344321 - cluster: "Bridged Device Basic Information" - endpoint: 3 + cluster: "Basic Information" + endpoint: 0 tests: - - label: "Wait for the commissioned device to be retrieved" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - label: "TH reads VendorName from the DUT." PICS: BRBINFO.S.A0001 - command: "readAttribute" - attribute: "VendorName" - response: - saveAs: VendorNameValue - constraints: - type: char_string - maxLength: 32 - - - label: "TH writes VendorName from the DUT." + verification: | + ./chip-tool bridgeddevicebasicinformation read vendor-name 1 3 + + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + + Example Log: + [1656495199.434300][2158:2163] CHIP:TOO: VendorName: TEST_VENDOR + disabled: true + + - label: "TH writes VendorName as sample" PICS: BRBINFO.S.A0001 - command: "writeAttribute" - attribute: "VendorName" - arguments: - value: "sample" - response: - error: UNSUPPORTED_WRITE + verification: | + ./chip-tool bridgeddevicebasicinformation write-by-id 1 ""vendor-name sample"" 1 3 - - label: "TH reads VendorName from the DUT." + Verify response has UNSUPPORTED_WRITE write on TH(chip-tool) Log: + + [1656495259.991989][2164:2169] CHIP:TOO: Response Failure: IM Error 0x00000588: General error: 0x88 (UNSUPPORTED_WRITE) + disabled: true + + - label: "TH reads VendorName" PICS: BRBINFO.S.A0001 - command: "readAttribute" - attribute: "VendorName" - response: - value: VendorNameValue + verification: | + ./chip-tool bridgeddevicebasicinformation read vendor-name 1 3 + + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + + Example Log: + [1656495199.434300][2158:2163] CHIP:TOO: VendorName: TEST_VENDOR + disabled: true - label: "TH reads VendorID from the DUT." PICS: BRBINFO.S.A0002 - command: "readAttribute" - attribute: "VendorID" - response: - saveAs: VendorIDValue - constraints: - type: vendor_id - minValue: 1 - maxValue: 65521 + verification: | + ./chip-tool bridgeddevicebasicinformation read vendor-id 1 3 - - label: - "Verify that VendorID matches the value assigned to this manufacturer" - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && BRBINFO.S.A0002 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "TH writes VendorID from the DUT." + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + + Example Log: + [1656495322.252171][2177:2182] CHIP:TOO: VendorID: 65521 + disabled: true + + - label: "TH writes VendorID as 0x0011" PICS: BRBINFO.S.A0002 - command: "writeAttribute" - attribute: "VendorID" - arguments: - value: 0x0011 - response: - error: UNSUPPORTED_WRITE + verification: | + ./chip-tool bridgeddevicebasicinformation write-by-id 2 5 1 3 - - label: "TH reads VendorID from the DUT." + Verify DUT responds with unsupported write on TH(chip-tool) Log: + + [1656495259.991989][2164:2169] CHIP:TOO: Response Failure: IM Error 0x00000588: General error: 0x88 (UNSUPPORTED_WRITE) + disabled: true + + - label: "TH reads VendorID" PICS: BRBINFO.S.A0002 - command: "readAttribute" - attribute: "VendorID" - response: - value: VendorIDValue + verification: | + ./chip-tool bridgeddevicebasicinformation read vendor-id 1 3 + + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE - - label: "TH reads ProductName from the DUT" + Example Log: + [1656495322.252171][2177:2182] CHIP:TOO: VendorID: 65521 + disabled: true + + - label: "TH reads ProductName from the DUT." PICS: BRBINFO.S.A0003 - command: "readAttribute" - attribute: "ProductName" - response: - saveAs: ProductNameValue - constraints: - type: char_string - maxLength: 32 - - - label: "TH writes ProductName from the DUT." + verification: | + ./chip-tool bridgeddevicebasicinformation read product-name 1 3 + + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + + Example Log: + [1656495708.412745][2200:2205] CHIP:TOO: ProductName: TEST_PRODUCT + disabled: true + + - label: "TH writes ProductName as newproduct" PICS: BRBINFO.S.A0003 - command: "writeAttribute" - attribute: "ProductName" - arguments: - value: "newproduct" - response: - error: UNSUPPORTED_WRITE - - - label: "TH reads ProductName from the DUT" + verification: | + ./chip-tool bridgeddevicebasicinformation write-by-id 3 ""newproduct"" 1 3 + + Verify DUT responds with unsupported write on TH(chip-tool) Log: + + NOTE the quotes: single-quote/double-quote/string/double-quote/single-quote + [1656495259.991989][2164:2169] CHIP:TOO: Response Failure: IM Error 0x00000588: General error: 0x88 (UNSUPPORTED_WRITE) + disabled: true + + - label: "TH reads ProductName" PICS: BRBINFO.S.A0003 - command: "readAttribute" - attribute: "ProductName" - response: - value: ProductNameValue + verification: | + ./chip-tool bridgeddevicebasicinformation read product-name 1 3 + + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + + Example Log: + [1656495708.412745][2200:2205] CHIP:TOO: ProductName: TEST_PRODUCT + disabled: true - label: "TH reads NodeLabel from the DUT" PICS: BRBINFO.S.A0005 - command: "readAttribute" - attribute: "NodeLabel" - response: - saveAs: NodeLabelValue - constraints: - type: char_string - maxLength: 32 + verification: | + ./chip-tool bridgeddevicebasicinformation read node-label 1 3 + + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE - #Issue https://github.com/project-chip/connectedhomeip/issues/23509 - - label: "TH writes NodeLabel from the DUT." - PICS: BRBINFO.S.A0005 && PICS_USER_PROMPT + Example Log: + [1657696463.081741][15476:15481] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_0039 Attribute 0x0000_0005 DataVersion: 2577979325 + [1657696463.081791][15476:15481] CHIP:TOO: NodeLabel: Light 1 + disabled: true + + - label: "TH writes newnode to NodeLabel" + PICS: BRBINFO.S.A0005 verification: | - ./chip-tool bridgeddevicebasicinformation write node-label '"newnode"' 1 3 + ./chip-tool bridgeddevicebasicinformation write node-label ""newnode"" 1 3 - Verify response has unsupported write on TH(chip-tool) Log: + Verify response has UNSUPPORTED_WRITE on TH(chip-tool) Log: NOTE the quotes: single-quote/double-quote/string/double-quote/single-quote @@ -152,360 +151,380 @@ tests: [1660839701.840827][2444:2449] CHIP:DMG: }, [1660839701.840905][2444:2449] CHIP:DMG: [1660839701.840973][2444:2449] CHIP:DMG: }, - cluster: "LogCommands" - command: "UserPrompt" - arguments: - values: - - name: "message" - value: "Please enter 'y' after success" - - name: "expectedValue" - value: "y" + disabled: true - - label: "TH reads NodeLabel from the DUT" - PICS: BRBINFO.S.A0005 && PICS_USER_PROMPT + - label: "TH reads NodeLabel" + PICS: BRBINFO.S.A0005 verification: | ./chip-tool bridgeddevicebasicinformation read node-label 1 3 Verify the value of node-label is type of string and contains length between 0 and 32 in TH(chip-tool) Log: + Note: If the write access is implemented then the value of the of the Nodelabel will be changed into "newnode" [1657696463.081741][15476:15481] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_0039 Attribute 0x0000_0005 DataVersion: 2577979325 - [1657696463.081791][15476:15481] CHIP:TOO: NodeLabel: newnode - cluster: "LogCommands" - command: "UserPrompt" - arguments: - values: - - name: "message" - value: "Please enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: "TH reads HardwareVersion from the DUT" + [1657696463.081791][15476:15481] CHIP:TOO: NodeLabel: Light 1 + disabled: true + + - label: "TH reads HardwareVersion from the DUT." PICS: BRBINFO.S.A0007 - command: "readAttribute" - attribute: "HardwareVersion" - response: - saveAs: HardwareVersionValue - constraints: - type: int16u - minValue: 0 - maxValue: 65534 - - - label: "TH writes HardwareVersion from the DUT." + verification: | + ./chip-tool bridgeddevicebasicinformation read hardware-version 1 3 + + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + + Example Log: + [1656496175.564718][2302:2307] CHIP:TOO: HardwareVersion: 0 + disabled: true + + - label: "TH writes HardwareVersion as 0x4531" PICS: BRBINFO.S.A0007 - command: "writeAttribute" - attribute: "HardwareVersion" - arguments: - value: 0x4531 - response: - error: UNSUPPORTED_WRITE - - - label: "TH reads HardwareVersion from the DUT" + verification: | + ./chip-tool bridgeddevicebasicinformation write-by-id 7 ""hardware-version 0x4531"" 1 3 + + Verify DUT responds with unsupported write on TH(chip-tool) Log: + + [1656495259.991989][2164:2169] CHIP:TOO: Response Failure: IM Error 0x00000588: General error: 0x88 (UNSUPPORTED_WRITE) + disabled: true + + - label: "TH reads HardwareVersion" PICS: BRBINFO.S.A0007 - command: "readAttribute" - attribute: "HardwareVersion" - response: - value: HardwareVersionValue + verification: | + ./chip-tool bridgeddevicebasicinformation read hardware-version 1 3 + + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + + Example Log: + [1656496175.564718][2302:2307] CHIP:TOO: HardwareVersion: 0 + disabled: true - label: "TH reads HardwareVersionString from the DUT." PICS: BRBINFO.S.A0008 - command: "readAttribute" - attribute: "HardwareVersionString" - response: - saveAs: HardwareVersionStringValue - constraints: - type: char_string - minLength: 1 - maxLength: 64 - - - label: "TH writes HardwareVersionString from the DUT." + verification: | + ./chip-tool bridgeddevicebasicinformation read hardware-version-string 1 3 + + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + + Example Log: + [1656496257.298675][2315:2320] CHIP:TOO: HardwareVersionString: TEST_VERSION + disabled: true + + - label: "TH writes HardwareVersionString as newhardwareversion" PICS: BRBINFO.S.A0008 - command: "writeAttribute" - attribute: "HardwareVersionString" - arguments: - value: "newhardwareversion" - response: - error: UNSUPPORTED_WRITE + verification: | + ./chip-tool bridgeddevicebasicinformation write-by-id 8 ""hardware-version-string newhardwareversion"" 1 3 - - label: "TH reads HardwareVersionString from the DUT." + Verify response has unsupported write on TH(chip-tool) Log: + + [1656495259.991989][2164:2169] CHIP:TOO: Response Failure: IM Error 0x00000588: General error: 0x88 (UNSUPPORTED_WRITE) + disabled: true + + - label: "TH reads HardwareVersionString" PICS: BRBINFO.S.A0008 - command: "readAttribute" - attribute: "HardwareVersionString" - response: - value: HardwareVersionStringValue + verification: | + ./chip-tool bridgeddevicebasicinformation read hardware-version-string 1 3 - - label: "TH reads SoftwareVersion from the DUT" + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + + Example Log: + [1656496257.298675][2315:2320] CHIP:TOO: HardwareVersionString: TEST_VERSION + disabled: true + + - label: "TH reads SoftwareVersion from the DUT." PICS: BRBINFO.S.A0009 - command: "readAttribute" - attribute: "SoftwareVersion" - response: - saveAs: SoftwareVersionValue - constraints: - minValue: 0 - maxValue: 4294967294 - - - label: "TH writes SoftwareVersion from the DUT." + verification: | + ./chip-tool bridgeddevicebasicinformation read software-version 1 3 + + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + + Example Log: + [1656496411.609866][2348:2353] CHIP:TOO: SoftwareVersion: 1 + disabled: true + + - label: "TH writes SoftwareVersion as 0x8213" PICS: BRBINFO.S.A0009 - command: "writeAttribute" - attribute: "SoftwareVersion" - arguments: - value: 0x8213 - response: - error: UNSUPPORTED_WRITE - - - label: "TH reads SoftwareVersion from the DUT" + verification: | + ./chip-tool bridgeddevicebasicinformation write-by-id 9 ""software-version 0x8213"" 1 3 + + Verify DUT responds with unsupported write on TH(chip-tool) Log: + + [1656495259.991989][2164:2169] CHIP:TOO: Response Failure: IM Error 0x00000588: General error: 0x88 (UNSUPPORTED_WRITE) + disabled: true + + - label: "TH reads SoftwareVersion" PICS: BRBINFO.S.A0009 - command: "readAttribute" - attribute: "SoftwareVersion" - response: - value: SoftwareVersionValue + verification: | + ./chip-tool bridgeddevicebasicinformation read software-version 1 3 - - label: "TH reads SoftwareVersionString from the DUT" + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + + Example Log: + [1656496411.609866][2348:2353] CHIP:TOO: SoftwareVersion: 1 + disabled: true + + - label: "TH reads SoftwareVersionString from the DUT." PICS: BRBINFO.S.A000a - command: "readAttribute" - attribute: "SoftwareVersionString" - response: - saveAs: SoftwareVersionStringValue - constraints: - minLength: 1 - maxLength: 64 - - - label: "TH writes SoftwareVersionString from the DUT." + verification: | + ./chip-tool bridgeddevicebasicinformation read software-version-string 1 3 + + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + + Example Log: + [1656496498.568951][2362:2367] CHIP:TOO: SoftwareVersionString: 1.0 + disabled: true + + - label: "TH writes SoftwareVersionString as 1.0" PICS: BRBINFO.S.A000a - command: "writeAttribute" - attribute: "SoftwareVersionString" - arguments: - value: "1.0" - response: - error: UNSUPPORTED_WRITE - - - label: "TH reads SoftwareVersionString from the DUT" + verification: | + ./chip-tool bridgeddevicebasicinformation write-by-id 10 ""software-version-string 1.0"" 1 3 + + Verify response has unsupported write on TH(chip-tool) Log: + + + [1656495259.991989][2164:2169] CHIP:TOO: Response Failure: IM Error 0x00000588: General error: 0x88 (UNSUPPORTED_WRITE) + disabled: true + + - label: "TH reads SoftwareVersionString" PICS: BRBINFO.S.A000a - command: "readAttribute" - attribute: "SoftwareVersionString" - response: - value: SoftwareVersionStringValue + verification: | + ./chip-tool bridgeddevicebasicinformation read software-version-string 1 3 + + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + + Example Log: + [1656496498.568951][2362:2367] CHIP:TOO: SoftwareVersionString: 1.0 + disabled: true - label: "TH reads ManufacturingDate from the DUT." PICS: BRBINFO.S.A000b - command: "readAttribute" - attribute: "ManufacturingDate" - response: - saveAs: ManufacturingDateValue - constraints: - type: char_string - minLength: 8 - maxLength: 16 + verification: | + ./chip-tool bridgeddevicebasicinformation read manufacturing-date 1 3 - - label: - "Verify if the first 8 characters specify date according to ISO 8601, - i.e, YYYYMMDD." - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && BRBINFO.S.A000b - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "TH writes ManufacturingDate from the DUT." + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + + Example Log: + [1656496661.777852][2388:2393] CHIP:TOO: ManufacturingDate: 20200101 + disabled: true + + - label: "TH writes ManufacturingDate as 20210814789452IN" PICS: BRBINFO.S.A000b - command: "writeAttribute" - attribute: "ManufacturingDate" - arguments: - value: "20210814789452IN" - response: - error: UNSUPPORTED_WRITE + verification: | + ./chip-tool bridgeddevicebasicinformation write-by-id 11 ""manufacturing-date 20210814789452IN"" 1 3 - - label: "TH reads ManufacturingDate from the DUT." + Verify DUT responds with unsupported write on TH(chip-tool) Log: + + [1656495259.991989][2164:2169] CHIP:TOO: Response Failure: IM Error 0x00000588: General error: 0x88 (UNSUPPORTED_WRITE) + disabled: true + + - label: "TH reads ManufacturingDate" PICS: BRBINFO.S.A000b - command: "readAttribute" - attribute: "ManufacturingDate" - response: - value: ManufacturingDateValue + verification: | + ./chip-tool bridgeddevicebasicinformation read manufacturing-date 1 3 - - label: "TH reads PartNumber from the DUT" + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + + Example Log: + [1656496661.777852][2388:2393] CHIP:TOO: ManufacturingDate: 20200101 + disabled: true + + - label: "TH reads PartNumber from the DUT." PICS: BRBINFO.S.A000c - command: "readAttribute" - attribute: "PartNumber" - response: - saveAs: PartNumberValue - constraints: - type: char_string - maxLength: 32 - - - label: "TH writes PartNumber from the DUT." + verification: | + ./chip-tool bridgeddevicebasicinformation read part-number 1 3 + + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + + Example Log: + + [1656496800.941788][2405:2410] CHIP:TOO: PartNumber: 1234 + disabled: true + + - label: "TH writes PartNumber as newpart" PICS: BRBINFO.S.A000c - command: "writeAttribute" - attribute: "PartNumber" - arguments: - value: "newpart" - response: - error: UNSUPPORTED_WRITE - - - label: "TH reads PartNumber from the DUT" + verification: | + ./chip-tool bridgeddevicebasicinformation write-by-id 12 ""part-number newpart"" 1 3 + + Verify response has unsupported write on TH(chip-tool) Log: + + [1656495259.991989][2164:2169] CHIP:TOO: Response Failure: IM Error 0x00000588: General error: 0x88 (UNSUPPORTED_WRITE) + disabled: true + + - label: "TH reads PartNumber" PICS: BRBINFO.S.A000c - command: "readAttribute" - attribute: "PartNumber" - response: - value: PartNumberValue + verification: | + ./chip-tool bridgeddevicebasicinformation read part-number 1 3 + + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE - - label: "TH reads ProductURL from the DUT" + Example Log: + [1656496800.941788][2405:2410] CHIP:TOO: PartNumber: 1234 + disabled: true + + - label: "TH reads ProductURL from the DUT." PICS: BRBINFO.S.A000d - command: "readAttribute" - attribute: "ProductURL" - response: - saveAs: ProductURLValue - constraints: - type: long_char_string - maxLength: 256 + verification: | + ./chip-tool bridgeddevicebasicinformation read product-url 1 3 - - label: - "Verify that it specifies a link to a specific web page, Verify that - it follows the syntax rules specified in RFC 3986." - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && BRBINFO.S.A000d - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "TH writes ProductURL from the DUT." + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + + Example Log: + + [1656497181.118653][2436:2441] CHIP:TOO: ProductURL: https://example.com/myproduct + disabled: true + + - label: "TH writes ProductURL as https://www.example.com" PICS: BRBINFO.S.A000d - command: "writeAttribute" - attribute: "ProductURL" - arguments: - value: "https://www.example.com" - response: - error: UNSUPPORTED_WRITE - - - label: "TH reads ProductURL from the DUT" + verification: | + ./chip-tool bridgeddevicebasicinformation write-by-id 13 ""product-url https://www.example.com"" 1 3 + + Verify response has unsupported write on TH(chip-tool) Log: + + [1656495259.991989][2164:2169] CHIP:TOO: Response Failure: IM Error 0x00000588: General error: 0x88 (UNSUPPORTED_WRITE) + disabled: true + + - label: "TH reads ProductURL" PICS: BRBINFO.S.A000d - command: "readAttribute" - attribute: "ProductURL" - response: - value: ProductURLValue + verification: | + ./chip-tool bridgeddevicebasicinformation read product-url 1 3 + + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + + Example Log: + [1656497181.118653][2436:2441] CHIP:TOO: ProductURL: https://example.com/myproduct + disabled: true - label: "TH reads ProductLabel from the DUT." PICS: BRBINFO.S.A000e - command: "readAttribute" - attribute: "ProductLabel" - response: - saveAs: ProductLabelValue - constraints: - type: char_string - maxLength: 64 + verification: | + ./chip-tool bridgeddevicebasicinformation read product-label 1 3 - - label: - "Verify that it does not include the name of the vendor as defined - within the VendorName attribute" - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && BRBINFO.S.A000e - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: "TH writes ProductLabel from the DUT." + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + + Example Log: + + [1656501313.811305][2602:2607] CHIP:TOO: ProductLabel: ABCD + disabled: true + + - label: "TH writes ProductLabel as newproductlabel" PICS: BRBINFO.S.A000e - command: "writeAttribute" - attribute: "ProductLabel" - arguments: - value: "newproductlabel" - response: - error: UNSUPPORTED_WRITE + verification: | + ./chip-tool bridgeddevicebasicinformation write-by-id 14 ""product-label newproductlabel"" 1 3 - - label: "TH reads ProductLabel from the DUT." + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + + Example Log: + [1656495259.991989][2164:2169] CHIP:TOO: Response Failure: IM Error 0x00000588: General error: 0x88 (UNSUPPORTED_WRITE) + disabled: true + + - label: "TH reads ProductLabel" PICS: BRBINFO.S.A000e - command: "readAttribute" - attribute: "ProductLabel" - response: - value: ProductLabelValue + verification: | + ./chip-tool bridgeddevicebasicinformation read product-label 1 3 + + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + + Example Log: + [1656501313.811305][2602:2607] CHIP:TOO: ProductLabel: ABCD + disabled: true - label: "TH reads SerialNumber from the DUT." PICS: BRBINFO.S.A000f - command: "readAttribute" - attribute: "SerialNumber" - response: - saveAs: SerialNumberValue - constraints: - type: char_string - maxLength: 32 - - - label: "TH writes SerialNumber from the DUT." + verification: | + ./chip-tool bridgeddevicebasicinformation read serial-number 1 3 + + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + + Example Log: + + [1656501452.183890][2624:2630] CHIP:TOO: SerialNumber: 5678 + disabled: true + + - label: "TH writes SerialNumber_test as newserialnumber" PICS: BRBINFO.S.A000f - command: "writeAttribute" - attribute: "SerialNumber" - arguments: - value: "newserialnumber" - response: - error: UNSUPPORTED_WRITE + verification: | + ./chip-tool bridgeddevicebasicinformation write-by-id 15 ""serial-number newserialnumber"" 1 3 - - label: "TH reads SerialNumber from the DUT." + Verify DUT responds with unsupported write on TH(chip-tool) Log: + + [1656495259.991989][2164:2169] CHIP:TOO: Response Failure: IM Error 0x00000588: General error: 0x88 (UNSUPPORTED_WRITE) + disabled: true + + - label: "TH reads SerialNumber" PICS: BRBINFO.S.A000f - command: "readAttribute" - attribute: "SerialNumber" - response: - value: SerialNumberValue + verification: | + ./chip-tool bridgeddevicebasicinformation read serial-number 1 3 + + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + + Example Log: + [1656501452.183890][2624:2630] CHIP:TOO: SerialNumber: 5678 + disabled: true - label: "TH reads Reachable from the DUT." PICS: BRBINFO.S.A0011 - command: "readAttribute" - attribute: "Reachable" - response: - value: true - constraints: - type: boolean + verification: | + ./chip-tool bridgeddevicebasicinformation read reachable 1 3 + + Verify the value of reachable is of type of bool and its true in TH Log: + + [1659012746.234251][8169:8174] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_0039 Attribute 0x0000_0011 DataVersion: 1363291551 + [1659012746.234309][8169:8174] CHIP:TOO: Reachable: TRUE + [1659012746.234420][8169:8174] CHIP:EM: Sending Standalone Ack for MessageCounter:92645971 on exchange 389i + disabled: true - label: "TH sends Write request message to DUT to change value of Reachable to - false" + false." PICS: BRBINFO.S.A0011 - command: "writeAttribute" - attribute: "Reachable" - arguments: - value: false - response: - error: UNSUPPORTED_WRITE + verification: | + ./chip-tool bridgeddevicebasicinformation write-by-id 17 false 1 3 + + Verify DUT responds with unsupported write on TH(chip-tool) Log: + [1656496372.884955][2340:2345] CHIP:DMG: } + [1656496372.885085][2340:2345] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1656496372.885148][2340:2345] CHIP:TOO: Response Failure: IM Error 0x00000588: General error: 0x88 (UNSUPPORTED_WRITE) + [1656496372.885242][2340:2345] CHIP:EM: Sending Standalone Ack for MessageCounter:201795946 on exchange 27637ihe attribute is optional so no example log can be provided. + disabled: true - label: "TH reads Reachable from the DUT." PICS: BRBINFO.S.A0011 - command: "readAttribute" - attribute: "Reachable" - response: - value: true - constraints: - type: boolean + verification: | + ./chip-tool bridgeddevicebasicinformation read reachable 1 3 + On TH(Chip tool), verify that the value of reachable is type is same as step 51 + + [1659012746.234251][8169:8174] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_0039 Attribute 0x0000_0011 DataVersion: 1363291551 + [1659012746.234309][8169:8174] CHIP:TOO: Reachable: TRUE + [1659012746.234420][8169:8174] CHIP:EM: Sending Standalone Ack for MessageCounter:92645971 on exchange 389i + disabled: true - label: "TH reads UniqueID from the DUT." PICS: BRBINFO.S.A0012 - command: "readAttribute" - attribute: "UniqueID" - response: - saveAs: UniqueIDValue - constraints: - type: char_string - maxLength: 32 - - - label: "TH writes UniqueID from the DUT." + verification: | + ./chip-tool bridgeddevicebasicinformation read unique-id 1 3 + + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + + Example Log: + + [1656501734.253827][2673:2679] CHIP:TOO: UniqueID: 30789FE4FCF832C9 + disabled: true + + - label: "TH writes UniqueID as newid" PICS: BRBINFO.S.A0012 - command: "writeAttribute" - attribute: "UniqueID" - arguments: - value: "newid" - response: - error: UNSUPPORTED_WRITE + verification: | + ./chip-tool bridgeddevicebasicinformation write-by-id 18 ""unique-id newid"" 1 3 - - label: "TH reads UniqueID from the DUT." + Verify response has unsupported write on TH(chip-tool) Log: + + [1656495259.991989][2164:2169] CHIP:TOO: Response Failure: IM Error 0x00000588: General error: 0x88 (UNSUPPORTED_WRITE) + disabled: true + + - label: "TH reads UniqueID" PICS: BRBINFO.S.A0012 - command: "readAttribute" - attribute: "UniqueID" - response: - value: UniqueIDValue + verification: | + ./chip-tool bridgeddevicebasicinformation read unique-id 1 3 + + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + + Example Log: + [1656501734.253827][2673:2679] CHIP:TOO: UniqueID: 30789FE4FCF832C9 + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_BRBINFO_2_3.yaml b/src/app/tests/suites/certification/Test_TC_BRBINFO_2_3.yaml index 4bce79acbd5934..4df4f21276c733 100644 --- a/src/app/tests/suites/certification/Test_TC_BRBINFO_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_BRBINFO_2_3.yaml @@ -127,32 +127,26 @@ tests: Optional Attribute - If it is supported, then in TH(bridge-app) log it will results in displaying the ReportDataMessage , else it will display UNSUPPORTED_ATTRIBUTE Example Log: - 1674814516.624600][16608:16608] CHIP:DMG: ReportDataMessage = - [1674814516.624614][16608:16608] CHIP:DMG: { - [1674814516.624619][16608:16608] CHIP:DMG: AttributeReportIBs = - [1674814516.624631][16608:16608] CHIP:DMG: [ - [1674814516.624639][16608:16608] CHIP:DMG: AttributeReportIB = - [1674814516.624651][16608:16608] CHIP:DMG: { - [1674814516.624659][16608:16608] CHIP:DMG: AttributeDataIB = - [1674814516.624668][16608:16608] CHIP:DMG: { - [1674814516.624677][16608:16608] CHIP:DMG: DataVersion = 0xf6524906, - [1674814516.624696][16608:16608] CHIP:DMG: AttributePathIB = - [1674814516.624705][16608:16608] CHIP:DMG: { - [1674814516.624715][16608:16608] CHIP:DMG: Endpoint = 0x3, - [1674814516.624724][16608:16608] CHIP:DMG: Cluster = 0x39, - [1674814516.624745][16608:16608] CHIP:DMG: Attribute = 0x0000_0005, - [1674814516.624759][16608:16608] CHIP:DMG: } - [1674814516.624770][16608:16608] CHIP:DMG: - [1674814516.624781][16608:16608] CHIP:DMG: Data = "Light 1" (7 chars), - [1674814516.624789][16608:16608] CHIP:DMG: }, - [1674814516.624801][16608:16608] CHIP:DMG: - [1674814516.624808][16608:16608] CHIP:DMG: }, - [1674814516.624820][16608:16608] CHIP:DMG: - [1674814516.624826][16608:16608] CHIP:DMG: ], - [1674814516.624841][16608:16608] CHIP:DMG: - [1674814516.624849][16608:16608] CHIP:DMG: SuppressResponse = true, - [1674814516.624858][16608:16608] CHIP:DMG: InteractionModelRevision = 1 - [1674814516.624863][16608:16608] CHIP:DMG: } + [1678082556.298595][4469:4469] CHIP:IM: Received Read request + [1678082556.298708][4469:4469] CHIP:DMG: ReadRequestMessage = + [1678082556.298741][4469:4469] CHIP:DMG: { + [1678082556.298765][4469:4469] CHIP:DMG: AttributePathIBs = + [1678082556.298807][4469:4469] CHIP:DMG: [ + [1678082556.298834][4469:4469] CHIP:DMG: AttributePathIB = + [1678082556.298867][4469:4469] CHIP:DMG: { + [1678082556.298899][4469:4469] CHIP:DMG: Endpoint = 0x3, + [1678082556.298933][4469:4469] CHIP:DMG: Cluster = 0x39, + [1678082556.298966][4469:4469] CHIP:DMG: Attribute = 0x0000_0005, + [1678082556.298998][4469:4469] CHIP:DMG: } + [1678082556.299030][4469:4469] CHIP:DMG: + [1678082556.299059][4469:4469] CHIP:DMG: ], + [1678082556.299089][4469:4469] CHIP:DMG: + [1678082556.299118][4469:4469] CHIP:DMG: isFabricFiltered = true, + [1678082556.299145][4469:4469] CHIP:DMG: InteractionModelRevision = 1 + [1678082556.299171][4469:4469] CHIP:DMG: }, + [1678082556.299247][4469:4469] CHIP:DMG: IM RH moving to [GeneratingReports] + [1678082556.299380][4469:4469] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1678082556.299413][4469:4469] CHIP:DMG: Cluster 39, Attribute 5 is dirty disabled: true - label: "DUT reads HardwareVersion from the TH" diff --git a/src/app/tests/suites/certification/Test_TC_BR_1.yaml b/src/app/tests/suites/certification/Test_TC_BR_1.yaml index 6f6ff349b7bcfc..a0d8a4985d252d 100644 --- a/src/app/tests/suites/certification/Test_TC_BR_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BR_1.yaml @@ -13,7 +13,7 @@ # limitations under the License. # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 3.1.1. [TC-BR-1] Basics of Bridging +name: 3.1.1. [TC-BR-1] Basics of Bridging (DUT server) PICS: - MCORE.BRIDGE @@ -52,6 +52,7 @@ tests: disabled: true - label: "Read attribute PartsList of the Descriptor cluster on endpoint 0" + PICS: MCORE.BRIDGE verification: | ./chip-tool descriptor read parts-list 1 0 @@ -76,14 +77,14 @@ tests: - label: "For each of the endpoints read in step 1b, read attribute DeviceTypeList of the Descriptor cluster on that endpoint" + PICS: MCORE.BRIDGE verification: | Verify which of Those endpoints in The previous step results have a DeviceTypeList containing device type Aggregator (Type- 14) for all The following steps, in TH(chip-tool) ./chip-tool descriptor read device-type-list 1 1 + Verify the DeviceTypeList entries with endpoint 1 On TH(chip-tool) Log - - Verify in TH(chip-tool) Log 1666244345.296680][44990:44995] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3968445751 [1666244345.296742][44990:44995] CHIP:TOO: DeviceTypeList: 1 entries [1666244345.296800][44990:44995] CHIP:TOO: [1]: { @@ -93,8 +94,7 @@ tests: ./chip-tool descriptor read device-type-list 1 3 - - Verify in TH(chip-tool) Log + Verify the DeviceTypeList entries with endpoint 3 On TH(chip-tool) Log [1666244839.544979][45200:45205] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1513076890 [1666244839.545006][45200:45205] CHIP:TOO: DeviceTypeList: 2 entries @@ -111,8 +111,7 @@ tests: ./chip-tool descriptor read device-type-list 1 4 - - Verify in TH(chip-tool) Log + Verify the DeviceTypeList entries with endpoint 4 On TH(chip-tool) Log [1666244925.833459][45215:45220] CHIP:TOO: Endpoint: 4 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1944707282 [1666244925.833553][45215:45220] CHIP:TOO: DeviceTypeList: 2 entries @@ -126,10 +125,9 @@ tests: [1666244925.833809][45215:45220] CHIP:TOO: } - ./chip-tool descriptor read device-type-list 1 5 - Verify in TH(chip-tool) Log + Verify the DeviceTypeList entries with endpoint 5 On TH(chip-tool) Log [1666244984.115887][45249:45254] CHIP:TOO: Endpoint: 5 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1760060075 [1666244984.115918][45249:45254] CHIP:TOO: DeviceTypeList: 2 entries @@ -143,12 +141,9 @@ tests: [1666244984.116005][45249:45254] CHIP:TOO: } - - ./chip-tool descriptor read device-type-list 1 6 - - Verify in TH(chip-tool) Log + Verify the DeviceTypeList entries with endpoint 6 On TH(chip-tool) Log [1666246675.944572][45787:45792] CHIP:TOO: Endpoint: 6 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3539120641 [1666246675.944625][45787:45792] CHIP:TOO: DeviceTypeList: 1 entries @@ -158,14 +153,10 @@ tests: [1666246675.944768][45787:45792] CHIP:TOO: } - - - ./chip-tool descriptor read device-type-list 1 7 + Verify the DeviceTypeList entries with endpoint 7 On TH(chip-tool) Log - - Verify in TH(chip-tool) Log [1666246718.470591][45821:45826] CHIP:TOO: Endpoint: 7 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3285189124 [1666246718.470649][45821:45826] CHIP:TOO: DeviceTypeList: 1 entries [1666246718.470678][45821:45826] CHIP:TOO: [1]: { @@ -174,12 +165,9 @@ tests: [1666246718.470733][45821:45826] CHIP:TOO: } - ./chip-tool descriptor read device-type-list 1 8 - - - Verify in TH(chip-tool) Log + Verify the DeviceTypeList entries with endpoint 8 On TH(chip-tool) Log [1666246775.067195][45834:45839] CHIP:TOO: Endpoint: 8 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3210151050 [1666246775.067256][45834:45839] CHIP:TOO: DeviceTypeList: 1 entries @@ -189,13 +177,9 @@ tests: [1666246775.067375][45834:45839] CHIP:TOO: } - - ./chip-tool descriptor read device-type-list 1 9 - - - Verify in TH(chip-tool) Log + Verify the DeviceTypeList entries with endpoint 9 On TH(chip-tool) Log [1666246820.646933][45893:45898] CHIP:TOO: Endpoint: 9 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3716023031 [1666246820.647028][45893:45898] CHIP:TOO: DeviceTypeList: 1 entries @@ -205,13 +189,9 @@ tests: [1666246820.647214][45893:45898] CHIP:TOO: } - - ./chip-tool descriptor read device-type-list 1 10 - - - Verify in TH(chip-tool) Log + Verify the DeviceTypeList entries with endpoint 10 On TH(chip-tool) Log [1666246866.935280][45904:45909] CHIP:TOO: Endpoint: 10 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 4193039876 [1666246866.935412][45904:45909] CHIP:TOO: DeviceTypeList: 2 entries @@ -226,8 +206,7 @@ tests: ./chip-tool descriptor read device-type-list 1 11 - - Verify in TH(chip-tool) Log + Verify the DeviceTypeList entries with endpoint 11 On TH(chip-tool) Log [1666246922.797443][45920:45925] CHIP:TOO: Endpoint: 11 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2632191905 [1666246922.797466][45920:45925] CHIP:TOO: DeviceTypeList: 2 entries @@ -239,13 +218,11 @@ tests: [1666246922.797527][45920:45925] CHIP:TOO: Type: 19 [1666246922.797533][45920:45925] CHIP:TOO: Revision: 1 [1666246922.797539][45920:45925] CHIP:TOO: } - [1666246922.797580][45920:45925] CHIP:EM: <<< [E:4 ./chip-tool descriptor read device-type-list 1 12 - - Verify in TH(chip-tool) Log + Verify the DeviceTypeList entries with endpoint 12 On TH(chip-tool) Log [1666246970.442284][45932:45937] CHIP:TOO: Endpoint: 12 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 494395813 [1666246970.442340][45932:45937] CHIP:TOO: DeviceTypeList: 2 entries @@ -261,9 +238,8 @@ tests: ./chip-tool descriptor read device-type-list 1 13 + Verify the DeviceTypeList entries with endpoint 13 On TH(chip-tool) Log - - Verify in TH(chip-tool) Log [1666247013.621248][45940:45945] CHIP:TOO: Endpoint: 13 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1009438523 [1666247013.621381][45940:45945] CHIP:TOO: DeviceTypeList: 2 entries [1666247013.621410][45940:45945] CHIP:TOO: [1]: { @@ -276,6 +252,17 @@ tests: [1666247013.621520][45940:45945] CHIP:TOO: } disabled: true + - label: + "IF 0 endpoints found in step 1c, FAIL the test (no Aggregator device + type found). ELSE Execute test steps 2a..7d for each of the endpoints + found in step 1c (i.e. for each of the Aggregator device types)" + PICS: MCORE.BRIDGE + verification: | + From Step1c, list all the endpoints having the aggregator i.e., 0x000e=14 + + Then in this case Endpoint is 1 + disabled: true + - label: "Read attribute PartsList of the Descriptor cluster on endpoint found in step 1c" @@ -307,12 +294,14 @@ tests: DeviceTypeList attribute in the Descriptor cluster on such endpoint, and select those endpoints which have (at least) a device type of Bridged Node in their DeviceTypeList" + PICS: MCORE.BRIDGE verification: | Verify device type has either Bridged node (0x0013), i.e., Type=19 in their DeviceTypeList - Verify in TH(chip-tool) Log ./chip-tool descriptor read device-type-list 1 3 + Verify the DeviceTypeList entries with endpoint 3 On TH(chip-tool) Log + [1666248913.681607][46430:46435] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1513076890 [1666248913.681690][46430:46435] CHIP:TOO: DeviceTypeList: 2 entries [1666248913.681759][46430:46435] CHIP:TOO: [1]: { @@ -326,9 +315,8 @@ tests: ./chip-tool descriptor read device-type-list 1 4 + Verify the DeviceTypeList entries with endpoint 4 On TH(chip-tool) Log - - Verify in TH(chip-tool) Log [1666249581.063940][46547:46552] CHIP:TOO: Endpoint: 4 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1944707282 [1666249581.064029][46547:46552] CHIP:TOO: DeviceTypeList: 2 entries [1666249581.064089][46547:46552] CHIP:TOO: [1]: { @@ -343,8 +331,7 @@ tests: ./chip-tool descriptor read device-type-list 1 5 - - Verify in TH(chip-tool) Log + Verify the DeviceTypeList entries with endpoint 5 On TH(chip-tool) Log [1666249707.579997][46594:46599] CHIP:TOO: Endpoint: 5 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1760060075 [1666249707.580060][46594:46599] CHIP:TOO: DeviceTypeList: 2 entries @@ -360,9 +347,7 @@ tests: ./chip-tool descriptor read device-type-list 1 6 - - Verify in TH(chip-tool) Log - + Verify the DeviceTypeList entries with endpoint 6 On TH(chip-tool) Log [1666249778.844305][46630:46635] CHIP:TOO: Endpoint: 6 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3539120641 [1666249778.844394][46630:46635] CHIP:TOO: DeviceTypeList: 1 entries @@ -372,12 +357,10 @@ tests: [1666249778.844560][46630:46635] CHIP:TOO: } - - ./chip-tool descriptor read device-type-list 1 7 + Verify the DeviceTypeList entries with endpoint 7 On TH(chip-tool) Log - Verify in TH(chip-tool) Log [1666249851.031384][46650:46655] CHIP:TOO: Endpoint: 7 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3285189124 [1666249851.031468][46650:46655] CHIP:TOO: DeviceTypeList: 1 entries [1666249851.031525][46650:46655] CHIP:TOO: [1]: { @@ -386,12 +369,9 @@ tests: [1666249851.031613][46650:46655] CHIP:TOO: } - ./chip-tool descriptor read device-type-list 1 8 - - - Verify in TH(chip-tool) Log + Verify the DeviceTypeList entries with endpoint 8 On TH(chip-tool) Log [1666249888.738349][46686:46691] CHIP:TOO: Endpoint: 8 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3210151050 [1666249888.738375][46686:46691] CHIP:TOO: DeviceTypeList: 1 entries @@ -401,12 +381,9 @@ tests: [1666249888.738415][46686:46691] CHIP:TOO: } - - ./chip-tool descriptor read device-type-list 1 9 - - Verify in TH(chip-tool) Log + Verify the DeviceTypeList entries with endpoint 9 On TH(chip-tool) Log [1666249928.585516][46696:46701] CHIP:TOO: Endpoint: 9 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3716023031 [1666249928.585580][46696:46701] CHIP:TOO: DeviceTypeList: 1 entries @@ -416,11 +393,9 @@ tests: [1666249928.585694][46696:46701] CHIP:TOO: } - ./chip-tool descriptor read device-type-list 1 10 - - Verify in TH(chip-tool) Log + Verify the DeviceTypeList entries with endpoint 10 On TH(chip-tool) Log [1666250003.848251][46707:46712] CHIP:TOO: Endpoint: 10 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 4193039876 [1666250003.848342][46707:46712] CHIP:TOO: DeviceTypeList: 2 entries @@ -436,7 +411,7 @@ tests: ./chip-tool descriptor read device-type-list 1 11 - Verify in TH(chip-tool) Log + Verify the DeviceTypeList entries with endpoint 11 On TH(chip-tool) Log [1666250205.808189][46800:46805] CHIP:TOO: Endpoint: 11 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2632191905 [1666250205.808274][46800:46805] CHIP:TOO: DeviceTypeList: 2 entries @@ -450,12 +425,10 @@ tests: [1666250205.808603][46800:46805] CHIP:TOO: } - ./chip-tool descriptor read device-type-list 1 12 + Verify the DeviceTypeList entries with endpoint 12 On TH(chip-tool) Log - - Verify in TH(chip-tool) Log [1666250398.116886][46821:46826] CHIP:TOO: Endpoint: 12 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 494395813 [1666250398.116974][46821:46826] CHIP:TOO: DeviceTypeList: 2 entries [1666250398.117056][46821:46826] CHIP:TOO: [1]: { @@ -470,9 +443,8 @@ tests: ./chip-tool descriptor read device-type-list 1 13 + Verify the DeviceTypeList entries with endpoint 13 On TH(chip-tool) Log - - Verify in TH(chip-tool) Log [1666250472.105194][46833:46838] CHIP:TOO: Endpoint: 13 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1009438523 [1666250472.105364][46833:46838] CHIP:TOO: DeviceTypeList: 2 entries [1666250472.105428][46833:46838] CHIP:TOO: [1]: { @@ -515,7 +487,7 @@ tests: Configuration cluster refers to" PICS: MCORE.BRIDGE && MCORE.BRIDGE.BatInfo verification: | - For Power Source Configuration and Power Source clusters, ref the test plan - Link Link2 + For Power Source Configuration and Power Source clusters, ref the test plan - Link1: https://github.com/CHIP-Specifications/chip-test-plans/blob/master/src/cluster/powersourceconfiguration.adoc Link2: https://github.com/CHIP-Specifications/chip-test-plans/blob/master/src/cluster/powersource.adoc None of the endpoints listed in step 2b supports Power Source Configuration cluster and Power Source cluster. @@ -534,8 +506,7 @@ tests: ./chip-tool descriptor read device-type-list 1 3 - - Verify in TH(chip-tool) Log + Verify the DeviceTypeList entries with endpoint 3 On TH(chip-tool) Log [1666250653.988384][46910:46915] CHIP:TOO: Endpoint: 3 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1513076890 [1666250653.988484][46910:46915] CHIP:TOO: DeviceTypeList: 2 entries @@ -552,9 +523,7 @@ tests: ./chip-tool descriptor read device-type-list 1 4 - - - Verify in TH(chip-tool) Log + Verify the DeviceTypeList entries with endpoint 4 On TH(chip-tool) Log [1666250817.223402][46942:46947] CHIP:TOO: Endpoint: 4 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1944707282 [1666250817.223467][46942:46947] CHIP:TOO: DeviceTypeList: 2 entries @@ -571,9 +540,8 @@ tests: ./chip-tool descriptor read device-type-list 1 5 + Verify the DeviceTypeList entries with endpoint 5 On TH(chip-tool) Log - - Verify in TH(chip-tool) Log [1666250873.731351][46954:46959] CHIP:TOO: Endpoint: 5 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1760060075 [1666250873.731439][46954:46959] CHIP:TOO: DeviceTypeList: 2 entries [1666250873.731482][46954:46959] CHIP:TOO: [1]: { @@ -588,9 +556,7 @@ tests: ./chip-tool descriptor read device-type-list 1 6 - - - Verify in TH(chip-tool) Log + Verify the DeviceTypeList entries with endpoint 6 On TH(chip-tool) Log [1666777557.437994][150164:150169] CHIP:TOO: Endpoint: 6 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3270810303 [1666777557.438067][150164:150169] CHIP:TOO: DeviceTypeList: 1 entries @@ -600,12 +566,10 @@ tests: [1666777557.438209][150164:150169] CHIP:TOO: } - - ./chip-tool descriptor read device-type-list 1 10 + Verify the DeviceTypeList entries with endpoint 10 On TH(chip-tool) Log - Verify in TH(chip-tool) Log [1666777615.234902][150178:150183] CHIP:TOO: Endpoint: 10 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2077823451 [1666777615.235002][150178:150183] CHIP:TOO: DeviceTypeList: 2 entries [1666777615.235078][150178:150183] CHIP:TOO: [1]: { @@ -618,12 +582,9 @@ tests: [1666777615.235307][150178:150183] CHIP:TOO: } - ./chip-tool descriptor read device-type-list 1 11 - - - Verify in TH(chip-tool) Log + Verify the DeviceTypeList entries with endpoint 11 On TH(chip-tool) Log [1666777671.688839][150216:150221] CHIP:TOO: Endpoint: 11 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2814988377 [1666777671.688927][150216:150221] CHIP:TOO: DeviceTypeList: 2 entries @@ -638,8 +599,7 @@ tests: ./chip-tool descriptor read device-type-list 1 12 - - Verify in TH(chip-tool) Log + Verify the DeviceTypeList entries with endpoint 12 On TH(chip-tool) Log [1666777714.615379][150259:150264] CHIP:TOO: Endpoint: 12 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 312494071 [1666777714.615443][150259:150264] CHIP:TOO: DeviceTypeList: 2 entries @@ -655,9 +615,7 @@ tests: ./chip-tool descriptor read device-type-list 1 13 - - - Verify in TH(chip-tool) Log + Verify the DeviceTypeList entries with endpoint 13 On TH(chip-tool) Log [1666777780.917239][150295:150300] CHIP:TOO: Endpoint: 13 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2475792486 [1666777780.917356][150295:150300] CHIP:TOO: DeviceTypeList: 2 entries @@ -683,6 +641,7 @@ tests: - label: "Read the state of this bridged device (through Matter), e.g. on/off, brightness" + PICS: MCORE.BRIDGE verification: | ./chip-tool onoff read on-off 1 3 @@ -695,6 +654,7 @@ tests: - label: "Change the state of this bridged device (through Matter), e.g. change its brightness or toggle its on/off state" + PICS: MCORE.BRIDGE verification: | ./chip-tool onoff toggle 1 3 @@ -734,6 +694,7 @@ tests: disabled: true - label: "Read the state of this bridged device (through Matter), as in 6b" + PICS: MCORE.BRIDGE verification: | ./chip-tool onoff read on-off 1 3 @@ -756,9 +717,12 @@ tests: - label: "Read the state of this bridged device (through Matter), e.g. occupancy status, contact status, current temperature" + PICS: MCORE.BRIDGE verification: | ./chip-tool temperaturemeasurement read measured-value 1 4 - Verify the state of the bridged device matches the actual physical state of the sensor + + Verify the state of the bridged device matches the actual physical state of the sensor in TH(chip-tool) Log + [1659351487.005743][12201:12207] CHIP:TOO: Endpoint: 4 Cluster: 0x0000_0402 Attribute 0x0000_0000 DataVersion: 2406690152 [1659351487.005831][12201:12207] CHIP:TOO: MeasuredValue: 100 [1659351487.005924][12201:12207] CHIP:EM: Sending Standalone Ack for MessageCounter:236763897 on exchange 8128i @@ -767,8 +731,9 @@ tests: - label: "Change the state of this sensor (e.g. cover the occupancy sensor, open the contact sensor, heat the temperature sensor)" + PICS: MCORE.BRIDGE verification: | - Press a key "t" on bridge-app to change the simulated temperature + Press a key 't' on bridge-app to change the simulated temperature [1659351537.115828][14237:14242] CHIP:DL: TempSensorDevice[TempSensor 1]: New measurement="200" [1659351537.115987][14237:14242] CHIP:DL: TempSensorDevice[TempSensor 2]: New measurement="200" @@ -780,10 +745,11 @@ tests: disabled: true - label: "Read the state of this bridged device again, as in 7b" + PICS: MCORE.BRIDGE verification: | ./chip-tool temperaturemeasurement read measured-value 1 4 - Verify that the state has changed and expect to get a different value in TH(Chip-tool) than step 7b + Verify the state has changed and expect to get a different value than step 7b in TH(chip-tool) Log [1659351542.393349][12212:12217] CHIP:TOO: Endpoint: 4 Cluster: 0x0000_0402 Attribute 0x0000_0000 DataVersion: 2406690153 [1659351542.393429][12212:12217] CHIP:TOO: MeasuredValue: 200 [1659351542.393552][12212:12217] CHIP:EM: Sending Standalone Ack for MessageCounter:120981971 on exchange 25924i diff --git a/src/app/tests/suites/certification/Test_TC_BR_3.yaml b/src/app/tests/suites/certification/Test_TC_BR_3.yaml index d44ec8a8c81b63..f4bd78d31f37e9 100644 --- a/src/app/tests/suites/certification/Test_TC_BR_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_BR_3.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: 3.1.3. [TC-BR-3] Changing name and state of a bridged device +name: 3.1.3. [TC-BR-3] Changing name and state of a bridged device (DUT server) PICS: - MCORE.BRIDGE @@ -24,6 +24,13 @@ config: endpoint: 0 tests: + - label: "Precondition" + verification: | + 1. DUT has been commissioned to TH + + 2.Two or more bridged devices of a supported type connected via non-Matter network/protocol to DUT (bridge) + disabled: true + - label: "Get the name of a bridged device: Read the NodeLabel attribute of the Bridged Device Basic Information cluster on the applicable endpoint" diff --git a/src/app/tests/suites/certification/Test_TC_BR_4.yaml b/src/app/tests/suites/certification/Test_TC_BR_4.yaml index 483f5aaa617700..33470fdfa0d5c6 100644 --- a/src/app/tests/suites/certification/Test_TC_BR_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_BR_4.yaml @@ -3654,7 +3654,7 @@ tests: ./chip-tool descriptor read device-type-list 1 6 - Verify in TH(bridge-app) Log: + Verify the DeviceTypeList attribute with endpoint 6 On TH(bridge-app) Log: [1666961312.435864][218195:218195] CHIP:IM: Received Read request [1666961312.435907][218195:218195] CHIP:DMG: ReadRequestMessage = [1666961312.435918][218195:218195] CHIP:DMG: { @@ -3756,7 +3756,7 @@ tests: ./chip-tool descriptor read device-type-list 1 7 - Verify in TH(bridge-app) Log: + Verify the DeviceTypeList attribute with endpoint 7 On TH(bridge-app) Log: [1666961364.286140][218195:218195] CHIP:IM: Received Read request [1666961364.286177][218195:218195] CHIP:DMG: ReadRequestMessage = [1666961364.286185][218195:218195] CHIP:DMG: { @@ -3857,7 +3857,7 @@ tests: ./chip-tool descriptor read device-type-list 1 8 - Verify in TH(bridge-app) Log: + Verify the DeviceTypeList attribute with endpoint 8 On TH(bridge-app) Log: [1666961419.607662][218195:218195] CHIP:IM: Received Read request [1666961419.607690][218195:218195] CHIP:DMG: ReadRequestMessage = [1666961419.607697][218195:218195] CHIP:DMG: { @@ -3958,7 +3958,7 @@ tests: ./chip-tool descriptor read device-type-list 1 9 - Verify in TH(bridge-app) Log: + Verify the DeviceTypeList attribute with endpoint 9 On TH(bridge-app) Log: [1666961467.313086][218195:218195] CHIP:IM: Received Read request [1666961467.313117][218195:218195] CHIP:DMG: ReadRequestMessage = [1666961467.313124][218195:218195] CHIP:DMG: { @@ -4060,7 +4060,7 @@ tests: ./chip-tool descriptor read device-type-list 1 10 - Verify in TH(bridge-app) Log: + Verify the DeviceTypeList attribute with endpoint 10 On TH(bridge-app) Log: [1666961546.940423][218195:218195] CHIP:IM: Received Read request [1666961546.940503][218195:218195] CHIP:DMG: ReadRequestMessage = [1666961546.940529][218195:218195] CHIP:DMG: { @@ -4184,7 +4184,7 @@ tests: ./chip-tool descriptor read device-type-list 1 11 - Verify in TH(bridge-app) Log: + Verify the DeviceTypeList attribute with endpoint 11 On TH(bridge-app) Log: [1666961579.870142][218195:218195] CHIP:IM: Received Read request [1666961579.870175][218195:218195] CHIP:DMG: ReadRequestMessage = [1666961579.870183][218195:218195] CHIP:DMG: { @@ -4305,8 +4305,134 @@ tests: [1666961579.871759][218195:218195] CHIP:DMG: InteractionModelRevision = 1 [1666961579.871767][218195:218195] CHIP:DMG: } + ./chip-tool descriptor read device-type-list 1 12 + + Verify the DeviceTypeList attribute with endpoint 12 On TH(bridge-app) Log: + + [1666961637.024382][218195:218195] CHIP:EM: Handling via exchange: 24264r, Delegate: 0x559dd6ddf8c8 + [1666961637.024406][218195:218195] CHIP:IM: Received Read request + [1666961637.024459][218195:218195] CHIP:DMG: ReadRequestMessage = + [1666961637.024477][218195:218195] CHIP:DMG: { + [1666961637.024487][218195:218195] CHIP:DMG: AttributePathIBs = + [1666961637.024501][218195:218195] CHIP:DMG: [ + [1666961637.024514][218195:218195] CHIP:DMG: AttributePathIB = + [1666961637.024528][218195:218195] CHIP:DMG: { + [1666961637.024542][218195:218195] CHIP:DMG: Endpoint = 0xc, + [1666961637.024555][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961637.024569][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961637.024588][218195:218195] CHIP:DMG: } + [1666961637.024599][218195:218195] CHIP:DMG: + [1666961637.024608][218195:218195] CHIP:DMG: ], + [1666961637.024624][218195:218195] CHIP:DMG: + [1666961637.024641][218195:218195] CHIP:DMG: isFabricFiltered = true, + [1666961637.024651][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961637.024665][218195:218195] CHIP:DMG: }, + [1666961637.024707][218195:218195] CHIP:DMG: IM RH moving to [GeneratingReports] + [1666961637.024758][218195:218195] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1666961637.024774][218195:218195] CHIP:DMG: Cluster 1d, Attribute 0 is dirty + [1666961637.024785][218195:218195] CHIP:DMG: Reading attribute: Cluster=0x0000_001D Endpoint=c AttributeId=0x0000_0000 (expanded=0) + [1666961637.024802][218195:218195] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_001D e=12 p=v + [1666961637.024821][218195:218195] CHIP:DMG: AccessControl: allowed + [1666961637.024865][218195:218195] CHIP:DMG: Sending report (payload has 105 bytes)... + [1666961637.025090][218195:218195] CHIP:EM: <<< [E:24264r M:129383321 (Ack:149091728)] (S) Msg TX to 1:000000000001B669 [E0A2] --- Type 0001:05 (IM:ReportData) + [1666961637.025123][218195:218195] CHIP:IN: (S) Sending msg 129383321 on secure session with LSID: 51710 + [1666961637.025575][218195:218195] CHIP:DMG: >> to UDP:[fe80::485c:bace:6107:3682%wlp3s0]:33508 | 129383321 | [Interaction Model (1) / Report Data (0x05) / Session = 47615 / Exchange = 24264] + [1666961637.025615][218195:218195] CHIP:DMG: Header Flags = + [1666961637.025630][218195:218195] CHIP:DMG: { + [1666961637.025654][218195:218195] CHIP:DMG: Exchange (0x06) = + [1666961637.025666][218195:218195] CHIP:DMG: { + [1666961637.025680][218195:218195] CHIP:DMG: AckMsg = 149091728 + [1666961637.025692][218195:218195] CHIP:DMG: NeedsAck = true + [1666961637.025703][218195:218195] CHIP:DMG: } + [1666961637.025722][218195:218195] CHIP:DMG: } + [1666961637.025733][218195:218195] CHIP:DMG: + [1666961637.025754][218195:218195] CHIP:DMG: Encrypted Payload (139 bytes) = + [1666961637.025766][218195:218195] CHIP:DMG: { + [1666961637.025779][218195:218195] CHIP:DMG: data = 00ffb900993bb607eb7a6237df23556ef55553d6bdb002eca4dec5b0286b803f131401a010db1aacec9934e01a4728a9e89e4d2474216e665d12fb28265cdb5e9f09d88aa8a7806960884a21b7f21a52c57cac7dd797cdb01ff66e27a1c177ddea3bf84a046a5d4245c3afec579722a901f988a639716e0d4b295494ec005278cca871ae42cb62e25adecf + [1666961637.025796][218195:218195] CHIP:DMG: buffer_ptr = 94136416760928 + [1666961637.025807][218195:218195] CHIP:DMG: } + [1666961637.025822][218195:218195] CHIP:DMG: + [1666961637.025845][218195:218195] CHIP:DMG: Decrypted Payload (105 bytes) = + [1666961637.025858][218195:218195] CHIP:DMG: { + [1666961637.025871][218195:218195] CHIP:DMG: data = 153601153501260083c07f68370124020c24031d240400183602181818153501260083c07f68370124020c24031d240400340518350225000001240101181818153501260083c07f68370124020c24031d240400340518350224001324010118181818290424ff0118 + [1666961637.025885][218195:218195] CHIP:DMG: } + [1666961637.025899][218195:218195] CHIP:DMG: + [1666961637.025985][218195:218195] CHIP:DMG: ReportDataMessage = + [1666961637.026005][218195:218195] CHIP:DMG: { + [1666961637.026020][218195:218195] CHIP:DMG: AttributeReportIBs = + [1666961637.026041][218195:218195] CHIP:DMG: [ + [1666961637.026055][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961637.026076][218195:218195] CHIP:DMG: { + [1666961637.026089][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961637.026106][218195:218195] CHIP:DMG: { + [1666961637.026122][218195:218195] CHIP:DMG: DataVersion = 0x687fc083, + [1666961637.026138][218195:218195] CHIP:DMG: AttributePathIB = + [1666961637.026155][218195:218195] CHIP:DMG: { + [1666961637.026171][218195:218195] CHIP:DMG: Endpoint = 0xc, + [1666961637.026187][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961637.026205][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961637.026219][218195:218195] CHIP:DMG: } + [1666961637.026238][218195:218195] CHIP:DMG: + [1666961637.026254][218195:218195] CHIP:DMG: Data = [ + [1666961637.026270][218195:218195] CHIP:DMG: + [1666961637.026288][218195:218195] CHIP:DMG: ], + [1666961637.026303][218195:218195] CHIP:DMG: }, + [1666961637.026323][218195:218195] CHIP:DMG: + [1666961637.026338][218195:218195] CHIP:DMG: }, + [1666961637.026366][218195:218195] CHIP:DMG: + [1666961637.026382][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961637.026405][218195:218195] CHIP:DMG: { + [1666961637.026419][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961637.026435][218195:218195] CHIP:DMG: { + [1666961637.026452][218195:218195] CHIP:DMG: DataVersion = 0x687fc083, + [1666961637.026467][218195:218195] CHIP:DMG: AttributePathIB = + [1666961637.026483][218195:218195] CHIP:DMG: { + [1666961637.026500][218195:218195] CHIP:DMG: Endpoint = 0xc, + [1666961637.026518][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961637.026536][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961637.026553][218195:218195] CHIP:DMG: ListIndex = Null, + [1666961637.026568][218195:218195] CHIP:DMG: } + [1666961637.026588][218195:218195] CHIP:DMG: + [1666961637.026605][218195:218195] CHIP:DMG: Data = + [1666961637.026622][218195:218195] CHIP:DMG: { + [1666961637.026640][218195:218195] CHIP:DMG: 0x0 = 256, + [1666961637.026658][218195:218195] CHIP:DMG: 0x1 = 1, + [1666961637.026675][218195:218195] CHIP:DMG: }, + [1666961637.026690][218195:218195] CHIP:DMG: }, + [1666961637.026711][218195:218195] CHIP:DMG: + [1666961637.026726][218195:218195] CHIP:DMG: }, + [1666961637.026754][218195:218195] CHIP:DMG: + [1666961637.026766][218195:218195] CHIP:DMG: AttributeReportIB = + [1666961637.026784][218195:218195] CHIP:DMG: { + [1666961637.026797][218195:218195] CHIP:DMG: AttributeDataIB = + [1666961637.026812][218195:218195] CHIP:DMG: { + [1666961637.026824][218195:218195] CHIP:DMG: DataVersion = 0x687fc083, + [1666961637.026835][218195:218195] CHIP:DMG: AttributePathIB = + [1666961637.026847][218195:218195] CHIP:DMG: { + [1666961637.026859][218195:218195] CHIP:DMG: Endpoint = 0xc, + [1666961637.026873][218195:218195] CHIP:DMG: Cluster = 0x1d, + [1666961637.026951][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, + [1666961637.027020][218195:218195] CHIP:DMG: ListIndex = Null, + [1666961637.027109][218195:218195] CHIP:DMG: } + [1666961637.027177][218195:218195] CHIP:DMG: + [1666961637.027238][218195:218195] CHIP:DMG: Data = + [1666961637.027299][218195:218195] CHIP:DMG: { + [1666961637.027360][218195:218195] CHIP:DMG: 0x0 = 19, + [1666961637.027423][218195:218195] CHIP:DMG: 0x1 = 1, + [1666961637.027435][218195:218195] CHIP:DMG: }, + [1666961637.027444][218195:218195] CHIP:DMG: }, + [1666961637.027459][218195:218195] CHIP:DMG: + [1666961637.027469][218195:218195] CHIP:DMG: }, + [1666961637.027483][218195:218195] CHIP:DMG: + [1666961637.027492][218195:218195] CHIP:DMG: ], + [1666961637.027515][218195:218195] CHIP:DMG: + [1666961637.027526][218195:218195] CHIP:DMG: SuppressResponse = true, + [1666961637.027535][218195:218195] CHIP:DMG: InteractionModelRevision = 1 + [1666961637.027543][218195:218195] CHIP:DMG: } + ./chip-tool descriptor read device-type-list 1 13 - Verify in TH(bridge-app) Log: + + Verify the DeviceTypeList attribute with endpoint 13 On TH(bridge-app) Log: [1666961681.323410][218195:218195] CHIP:IM: Received Read request [1666961681.323440][218195:218195] CHIP:DMG: ReadRequestMessage = [1666961681.323447][218195:218195] CHIP:DMG: { @@ -4428,7 +4554,7 @@ tests: [1666961681.324724][218195:218195] CHIP:DMG: } ./chip-tool descriptor read parts-list 1 0 - Verify in TH(bridge-app) Log: + Verify the PartList attribute with endpoint 0 On TH(bridge-app) Log: 1666962087.594430][218195:218195] CHIP:IM: Received Read request [1666962087.594452][218195:218195] CHIP:DMG: ReadRequestMessage = [1666962087.594457][218195:218195] CHIP:DMG: { @@ -4723,7 +4849,7 @@ tests: ./chip-tool descriptor read parts-list 1 1 - Verify in TH(bridge-app) Log: + Verify the PartList attribute with endpoint 1 On TH(bridge-app) Log: [1666962024.475117][218195:218195] CHIP:IM: Received Read request [1666962024.475146][218195:218195] CHIP:DMG: ReadRequestMessage = [1666962024.475155][218195:218195] CHIP:DMG: { @@ -5000,7 +5126,7 @@ tests: [1666962024.477789][218195:218195] CHIP:DMG: ./chip-tool descriptor read parts-list 1 2 - Verify in TH(bridge-app) Log: + Verify the PartList attribute with endpoint 2 On TH(bridge-app) Log: [1666962122.075925][218195:218195] CHIP:IM: Received Read request [1666962122.075953][218195:218195] CHIP:DMG: ReadRequestMessage = [1666962122.075960][218195:218195] CHIP:DMG: { @@ -5077,7 +5203,7 @@ tests: [1666962122.076769][218195:218195] CHIP:DMG: } ./chip-tool descriptor read parts-list 1 3 - Verify in TH(bridge-app) Log: + Verify the PartList attribute with endpoint 3 On TH(bridge-app) Log: [1666962181.272370][218195:218195] CHIP:IM: Received Read request [1666962181.272431][218195:218195] CHIP:DMG: ReadRequestMessage = [1666962181.272451][218195:218195] CHIP:DMG: { @@ -5156,7 +5282,7 @@ tests: [1666962181.274354][218195:218195] CHIP:DMG: ./chip-tool descriptor read parts-list 1 4 - Verify in TH(bridge-app) Log: + Verify the PartList attribute with endpoint 4 On TH(bridge-app) Log: [1666962226.211067][218195:218195] CHIP:IM: Received Read request [1666962226.211160][218195:218195] CHIP:DMG: ReadRequestMessage = @@ -5235,7 +5361,7 @@ tests: [1666962226.211991][218195:218195] CHIP:DMG: } ./chip-tool descriptor read parts-list 1 5 - Verify in TH(bridge-app) Log: + Verify the PartList attribute with endpoint 5 On TH(bridge-app) Log: [1666962275.528464][218195:218195] CHIP:IM: Received Read request [1666962275.528514][218195:218195] CHIP:DMG: ReadRequestMessage = [1666962275.528527][218195:218195] CHIP:DMG: { @@ -5313,7 +5439,7 @@ tests: [1666962275.533543][218195:218195] CHIP:DMG: } ./chip-tool descriptor read parts-list 1 6 - Verify in TH(bridge-app) Log: + Verify the PartList attribute with endpoint 6 On TH(bridge-app) Log: [1666962322.069585][218195:218195] CHIP:IM: Received Read request [1666962322.069620][218195:218195] CHIP:DMG: ReadRequestMessage = [1666962322.069628][218195:218195] CHIP:DMG: { @@ -5447,7 +5573,7 @@ tests: ./chip-tool descriptor read parts-list 1 7 - Verify in TH(bridge-app) Log: + Verify the PartList attribute with endpoint 7 On TH(bridge-app) Log: [1666962362.557106][218195:218195] CHIP:IM: Received Read request [1666962362.557147][218195:218195] CHIP:DMG: ReadRequestMessage = [1666962362.557158][218195:218195] CHIP:DMG: { @@ -5525,7 +5651,7 @@ tests: [1666962362.558321][218195:218195] CHIP:DMG: } ./chip-tool descriptor read parts-list 1 8 - Verify in TH(bridge-app) Log: + Verify the PartList attribute with endpoint 8 On TH(bridge-app) Log: [1666962423.861269][218195:218195] CHIP:IM: Received Read request [1666962423.861296][218195:218195] CHIP:DMG: ReadRequestMessage = [1666962423.861303][218195:218195] CHIP:DMG: { @@ -5604,7 +5730,8 @@ tests: [1666962423.862063][218195:218195] CHIP:DMG: ./chip-tool descriptor read parts-list 1 9 - Verify in TH(bridge-app) Log: + + Verify the PartList attribute with endpoint 9 On TH(bridge-app) Log: [1666962496.027253][218195:218195] CHIP:IM: Received Read request [1666962496.027291][218195:218195] CHIP:DMG: ReadRequestMessage = [1666962496.027300][218195:218195] CHIP:DMG: { @@ -5682,7 +5809,9 @@ tests: [1666962496.028498][218195:218195] CHIP:DMG: } ./chip-tool descriptor read parts-list 1 10 - Verify in TH(bridge-app) Log: + + Verify the PartList attribute with endpoint 10 On TH(bridge-app) Log: + [1666962545.266945][218195:218195] CHIP:IM: Received Read request [1666962545.266979][218195:218195] CHIP:DMG: ReadRequestMessage = [1666962545.266986][218195:218195] CHIP:DMG: { @@ -5760,7 +5889,9 @@ tests: [1666962545.267959][218195:218195] CHIP:DMG: } ./chip-tool descriptor read parts-list 1 11 - Verify in TH(bridge-app) Log: + + Verify the PartList attribute with endpoint 11 On TH(bridge-app) Log: + [1666962605.941370][218195:218195] CHIP:IM: Received Read request [1666962605.941421][218195:218195] CHIP:DMG: ReadRequestMessage = [1666962605.941433][218195:218195] CHIP:DMG: { @@ -5839,7 +5970,9 @@ tests: [1666962605.947147][218195:218195] CHIP:DMG: ./chip-tool descriptor read parts-list 1 12 - Verify in TH(bridge-app) Log: + + Verify the PartList attribute with endpoint 12 On TH(bridge-app) Log: + [1666962633.918167][218195:218195] CHIP:IM: Received Read request [1666962633.918280][218195:218195] CHIP:DMG: ReadRequestMessage = [1666962633.918309][218195:218195] CHIP:DMG: { @@ -5918,7 +6051,9 @@ tests: [1666962633.921723][218195:218195] CHIP:DMG: ./chip-tool descriptor read parts-list 1 13 - Verify in TH(bridge-app) Log: + + Verify the PartList attribute with endpoint 13 On TH(bridge-app) Log: + [1666962673.106887][218195:218195] CHIP:IM: Received Read request [1666962673.106920][218195:218195] CHIP:DMG: ReadRequestMessage = [1666962673.106927][218195:218195] CHIP:DMG: { @@ -6000,13 +6135,13 @@ tests: "Verify DUT has (during step 1a) read the NodeLabel attribute from the Bridged Device Basic Information cluster on various endpoints,Verify DUT contains the names for the (supported) devices from the above list" - PICS: MCORE.DEVLIST.UseDeviceState + PICS: MCORE.DEVLIST.UseDeviceName verification: | NodeLabel is supported for endpoints 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 ./chip-tool bridgeddevicebasicinformation read node-label 1 3 - Verify in TH(bridge-app) Log: + Verify the node-label with endpoint 3 On TH(bridge-app) Log: [1663916825.766885][1588:1588] CHIP:DMG: ReportDataMessage = [1663916825.766934][1588:1588] CHIP:DMG: { @@ -6019,9 +6154,9 @@ tests: [1663916825.767283][1588:1588] CHIP:DMG: DataVersion = 0x6bd99dc9, [1663916825.767309][1588:1588] CHIP:DMG: AttributePathIB = [1663916825.767388][1588:1588] CHIP:DMG: { - [1663916825.767423][1588:1588] CHIP:DMG: Endpoint = 0xd, - [1663916825.767456][1588:1588] CHIP:DMG: Cluster = 0x1d, - [1663916825.767502][1588:1588] CHIP:DMG: Attribute = 0x0000_0003, + [1663916825.767423][1588:1588] CHIP:DMG: Endpoint = 0x3, + [1663916825.767456][1588:1588] CHIP:DMG: Cluster = 0x39, + [1663916825.767502][1588:1588] CHIP:DMG: Attribute = 0x0000_0005, [1663916825.767578][1588:1588] CHIP:DMG: } [1663916825.767614][1588:1588] CHIP:DMG: [1663916825.767641][1588:1588] CHIP:DMG: Data = [ @@ -6044,7 +6179,7 @@ tests: ./chip-tool bridgeddevicebasicinformation read node-label 1 4 - Verify in TH(bridge-app) Log: + Verify the node-label with endpoint 4 On TH(bridge-app) Log: [1663916874.414183][1588:1588] CHIP:DMG: [1663916874.414304][1588:1588] CHIP:DMG: ReportDataMessage = @@ -6083,10 +6218,10 @@ tests: ./chip-tool bridgeddevicebasicinformation read node-label 1 5 - Verify in TH(bridge-app) Log: + Verify the node-label with endpoint 5 On TH(bridge-app) Log: [1663925132.199931][1588:1588] CHIP:DMG: - [1663925132.200086][1588:1588] CHIP:DMG: ReportDataMessage = + [1663925132.200086][1588:1588] CHIP:DMG: Verify in TH(bridge-app) Log:ReportDataMessage = [1663925132.200117][1588:1588] CHIP:DMG: { [1663925132.200153][1588:1588] CHIP:DMG: AttributeReportIBs = [1663925132.200190][1588:1588] CHIP:DMG: [ @@ -6122,7 +6257,7 @@ tests: ./chip-tool bridgeddevicebasicinformation read node-label 1 6 - Verify in TH(bridge-app) Log: + Verify the node-label with endpoint 6 On TH(bridge-app) Log: [1663925170.922635][1588:1588] CHIP:DMG: } [1663925170.922652][1588:1588] CHIP:DMG: @@ -6161,7 +6296,7 @@ tests: ./chip-tool bridgeddevicebasicinformation read node-label 1 7 - Verify in TH(bridge-app) Log: + Verify the node-label with endpoint 7 On TH(bridge-app) Log: [1663925266.540251][1588:1588] CHIP:DMG: [1663925266.540311][1588:1588] CHIP:DMG: ReportDataMessage = @@ -6198,7 +6333,7 @@ tests: ./chip-tool bridgeddevicebasicinformation read node-label 1 8 - Verify in TH(bridge-app) Log: + Verify the node-label with endpoint 8 On TH(bridge-app) Log: [1663925300.298779][1588:1588] CHIP:DMG: [1663925300.298852][1588:1588] CHIP:DMG: ReportDataMessage = @@ -6237,7 +6372,7 @@ tests: ./chip-tool bridgeddevicebasicinformation read node-label 1 9 - Verify in TH(bridge-app) Log: + Verify the node-label with endpoint 9 On TH(bridge-app) Log: [[1666958851.515530][218195:218195] CHIP:IM: Received Read request [1666958851.515565][218195:218195] CHIP:DMG: ReadRequestMessage = @@ -6318,7 +6453,7 @@ tests: ./chip-tool bridgeddevicebasicinformation read node-label 1 10 - Verify in TH(bridge-app) Log: + Verify the node-label with endpoint 10 On TH(bridge-app) Log: [1663925401.539430][1588:1588] CHIP:DMG: ReportDataMessage = [1663925401.539454][1588:1588] CHIP:DMG: { @@ -6356,7 +6491,7 @@ tests: ./chip-tool bridgeddevicebasicinformation read node-label 1 11 - Verify in TH(bridge-app) Log: + Verify the node-label with endpoint 11 On TH(bridge-app) Log: [1663925451.561534][1588:1588] CHIP:DMG: [1663925451.561598][1588:1588] CHIP:DMG: ReportDataMessage = @@ -6392,7 +6527,7 @@ tests: ./chip-tool bridgeddevicebasicinformation read node-label 1 12 - Verify in TH(bridge-app) Log: + Verify the node-label with endpoint 12 On TH(bridge-app) Log: [1663925487.322435][1588:1588] CHIP:DMG: [1663925487.322496][1588:1588] CHIP:DMG: ReportDataMessage = @@ -6428,7 +6563,7 @@ tests: ./chip-tool bridgeddevicebasicinformation read node-label 1 13 - Verify in TH(bridge-app) Log: + Verify the node-label with endpoint 13 On TH(bridge-app) Log: [1663925529.771162][1588:1588] CHIP:DMG: } [1663925529.771179][1588:1588] CHIP:DMG: @@ -6555,9 +6690,16 @@ tests: - label: "Use TH/bridge-app to change the on/off state of one or more of the - bridged On/Off lights (use key ''c'' in the console to bridge-app)" + bridged On/Off lights (use key 'c' in the console to bridge-app)" PICS: MCORE.DEVLIST.UseDeviceState verification: | + Press c on bridge-app to change the state + + Verify on TH(bridge-app) Log + c + [1678950518.634668][30220:30222] CHIP:DL: Device[Light 1b]: ON + [1678950518.634817][30220:30220] CHIP:DMG: Endpoint 3, Cluster 0x0000_0006 update version to e7d4a040 + Verify on TH(bridge-app) Log: ./chip-tool onoff read on-off 1 3 @@ -6625,7 +6767,7 @@ tests: [1666957963.876860][218195:218195] CHIP:DMG: Attribute = 0x0000_0000, [1666957963.876869][218195:218195] CHIP:DMG: } [1666957963.876879][218195:218195] CHIP:DMG: - [1666957963.876888][218195:218195] CHIP:DMG: Data = false, + [1666957963.876888][218195:218195] CHIP:DMG: Data = True, [1666957963.876894][218195:218195] CHIP:DMG: }, [1666957963.876904][218195:218195] CHIP:DMG: [1666957963.876912][218195:218195] CHIP:DMG: }, @@ -6684,11 +6826,11 @@ tests: - label: "Use TH/bridge-app to change the simulated temperature level of the - simulated temperature sensors (use key '''' in the console to + simulated temperature sensors (use key '' in the console to bridge-app)" PICS: MCORE.DEVLIST.UseDeviceState verification: | - Press a key "tbd" on bridge-app to change the simulated temperature + Press a key 'tbd' on bridge-app to change the simulated temperature ./chip-tool temperaturemeasurement read measured-value 1 4 @@ -6803,8 +6945,9 @@ tests: disabled: true - label: - "Use TH/bridge-app to rename a bridged light (use key ''b'' in the + "Use TH/bridge-app to rename a bridged light (use key 'b' in the console to bridge-app to rename Light 1 to Light 1b)" + PICS: MCORE.DEVLIST.UseDeviceName verification: | ./chip-tool bridgeddevicebasicinformation read node-label 1 3 @@ -6882,6 +7025,7 @@ tests: disabled: true - label: "Verify DUT contains the updated name for the renamed device" + PICS: MCORE.DEVLIST.UseDeviceName verification: | Verify on TH(bridge-app) Log b @@ -6889,10 +7033,10 @@ tests: disabled: true - label: - "Use TH/bridge-app to add a bridged light (use key ''2''' in the - console to bridge-app to add Light 2)" + "Use TH/bridge-app to add a bridged light (use key '2' in the console + to bridge-app to add Light 2)" verification: | - Press "2" on TH(bridge-app) Log + Press '2' on TH(bridge-app) Log ./chip-tool descriptor read parts-list 1 0 @@ -7009,7 +7153,7 @@ tests: disabled: true - label: - "Use TH/bridge-app to remove a bridged light (use key ''4'' in the + "Use TH/bridge-app to remove a bridged light (use key '4' in the console to bridge-app to remove Light 1b)" verification: | ./chip-tool descriptor read parts-list 1 0 @@ -7549,5 +7693,4 @@ tests: [1659352426.184434][14237:14242] CHIP:DMG: Endpoint 1, Cluster 0x0000_001D update version to 7e918baf [1659352426.184489][14237:14242] CHIP:DMG: Endpoint 0, Cluster 0x0000_001D update version to 7561f372 [1659352426.184512][14237:14242] CHIP:DL: Removed device Light 1b from dynamic endpoint 3 (index=0) - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_1.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_1.yaml index 5c6344e3f64e07..04ee3d8fff8349 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_1.yaml @@ -400,7 +400,7 @@ tests: On DUT_CR2 send the below command - + ./chip-tool pairing open-commissioning-window 2 1 400 2000 3841 --commissioner-name beta Verify the Commissioning window is opened in TH_CE(all-clusters-app) Log [1660901022.112296][3045:3045] CHIP:DIS: mDNS service published: _matterc._udp @@ -574,7 +574,7 @@ tests: ./chip-tool pairing code 1 34995354639 [1676358083.879096][997283:997283] CHIP:SVR: Failsafe timer expired [1676358083.879098][997283:997283] CHIP:IN: SecureSession[0x563d5294d7b0]: MarkForEviction Type:1 LSID:55630 - [1676358083.879100][997283:997283] CHIP:SC: SecureSession[0x563d5294d7b0]: Moving from state "kActive" --> "kPendingEviction" + [1676358083.879100][997283:997283] CHIP:SC: SecureSession[0x563d5294d7b0]: Moving from state 'kActive' --> 'kPendingEviction' [1676358083.879109][997283:997283] CHIP:IN: SecureSession[0x563d5294d7b0]: Released - Type:1 LSID:55630 [1676358083.879113][997283:997283] CHIP:SVR: Commissioning failed (attempt 1): ../../third_party/connectedhomeip/src/app/server/CommissioningWindowManager.cpp:77: CHIP Error 0x00000032: Timeout [1676358083.879123][997283:997283] CHIP:IN: SecureSession[0x563d5294d7b0]: Allocated Type:1 LSID:55631 @@ -588,10 +588,10 @@ tests: If the DUT has to provision to verify the logs, Verify the OperationalCert error 9 in TH_CE(all-clusters-app) Log [1676358083.879250][998226:998228] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0001 [1676358083.879258][998226:998228] CHIP:CTL: Failsafe disarmed - [1676358083.879264][998226:998228] CHIP:CTL: Successfully finished commissioning step "Cleanup" - [1676358083.879274][998226:998228] CHIP:TOO: Device commissioning Failure: ../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1365: CHIP Error 0x0000007E: Trying to add a NOC for a fabric that already exists + [1676358083.879264][998226:998228] CHIP:CTL: Successfully finished commissioning step 'Cleanup' + [1676358083.879274][998226:998228] CHIP:TOO: Device commissioning Failure: ../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1365: CHIP Error 0x0000007E: Trying to add a NOC for a fabric that already exists) with OperationalCert error 9 [1676358083.879284][998226:998228] CHIP:IN: SecureSession[0x7fe26000eec0]: MarkForEviction Type:1 LSID:21508 - [1676358083.879287][998226:998228] CHIP:SC: SecureSession[0x7fe26000eec0]: Moving from state "kActive" --> "kPendingEviction" + [1676358083.879287][998226:998228] CHIP:SC: SecureSession[0x7fe26000eec0]: Moving from state 'kActive' --> 'kPendingEviction' [1676358083.879312][998226:998228] CHIP:EM: Failed to send Solitary ack for MessageCounter:80598822 on exchange 54053i:../../third_party/connectedhomeip/src/messaging/ExchangeContext.cpp:144: CHIP Error 0x00000002: Connection aborted [1676358083.879325][998226:998228] CHIP:DMG: ICR moving to [AwaitingDe] disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_10.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_10.yaml index b826804790c34a..f126946bbd272b 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_10.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_10.yaml @@ -114,6 +114,7 @@ tests: - name: "expectedValue" value: "y" + #As per issue https://github.com/CHIP-Specifications/chip-test-scripts/issues/495 adding --discover-once flag - label: "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code" @@ -127,6 +128,8 @@ tests: value: nodeId2 - name: "payload" value: incorrectSetupCodePayload + - name: discoverOnce + value: true response: error: FAILURE @@ -143,6 +146,8 @@ tests: value: nodeId2 - name: "payload" value: incorrectSetupCodePayload + - name: discoverOnce + value: true response: error: FAILURE @@ -159,6 +164,8 @@ tests: value: nodeId2 - name: "payload" value: incorrectSetupCodePayload + - name: discoverOnce + value: true response: error: FAILURE @@ -175,6 +182,8 @@ tests: value: nodeId2 - name: "payload" value: incorrectSetupCodePayload + - name: discoverOnce + value: true response: error: FAILURE @@ -191,6 +200,8 @@ tests: value: nodeId2 - name: "payload" value: incorrectSetupCodePayload + - name: discoverOnce + value: true response: error: FAILURE @@ -207,6 +218,8 @@ tests: value: nodeId2 - name: "payload" value: incorrectSetupCodePayload + - name: discoverOnce + value: true response: error: FAILURE @@ -223,6 +236,8 @@ tests: value: nodeId2 - name: "payload" value: incorrectSetupCodePayload + - name: discoverOnce + value: true response: error: FAILURE @@ -239,6 +254,8 @@ tests: value: nodeId2 - name: "payload" value: incorrectSetupCodePayload + - name: discoverOnce + value: true response: error: FAILURE @@ -255,6 +272,8 @@ tests: value: nodeId2 - name: "payload" value: incorrectSetupCodePayload + - name: discoverOnce + value: true response: error: FAILURE @@ -270,6 +289,8 @@ tests: value: nodeId2 - name: "payload" value: incorrectSetupCodePayload + - name: discoverOnce + value: true response: error: FAILURE @@ -286,6 +307,8 @@ tests: value: nodeId2 - name: "payload" value: incorrectSetupCodePayload + - name: discoverOnce + value: true response: error: FAILURE @@ -302,6 +325,8 @@ tests: value: nodeId2 - name: "payload" value: incorrectSetupCodePayload + - name: discoverOnce + value: true response: error: FAILURE @@ -318,6 +343,8 @@ tests: value: nodeId2 - name: "payload" value: incorrectSetupCodePayload + - name: discoverOnce + value: true response: error: FAILURE @@ -334,6 +361,8 @@ tests: value: nodeId2 - name: "payload" value: incorrectSetupCodePayload + - name: discoverOnce + value: true response: error: FAILURE @@ -350,6 +379,8 @@ tests: value: nodeId2 - name: "payload" value: incorrectSetupCodePayload + - name: discoverOnce + value: true response: error: FAILURE @@ -366,6 +397,8 @@ tests: value: nodeId2 - name: "payload" value: incorrectSetupCodePayload + - name: discoverOnce + value: true response: error: FAILURE @@ -382,6 +415,8 @@ tests: value: nodeId2 - name: "payload" value: incorrectSetupCodePayload + - name: discoverOnce + value: true response: error: FAILURE @@ -398,6 +433,8 @@ tests: value: nodeId2 - name: "payload" value: incorrectSetupCodePayload + - name: discoverOnce + value: true response: error: FAILURE @@ -414,6 +451,8 @@ tests: value: nodeId2 - name: "payload" value: incorrectSetupCodePayload + - name: discoverOnce + value: true response: error: FAILURE @@ -430,6 +469,8 @@ tests: value: nodeId2 - name: "payload" value: incorrectSetupCodePayload + - name: discoverOnce + value: true response: error: FAILURE diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_11.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_11.yaml index cf6d428543061f..0c2eed149d2a8c 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_11.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_11.yaml @@ -11,9 +11,10 @@ # 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: - 30.1.11. [TC-CADMIN-1.11] Open commissioning window on DUT twice using ECM + 4.1.11. [TC-CADMIN-1.11] Open commissioning window on DUT twice using ECM then BCM [DUT - Commissionee] PICS: @@ -22,372 +23,350 @@ PICS: config: nodeId: 0x12344321 - timeout: 400 - nodeId2: - type: node_id - defaultValue: 0xCAFE - nodeId3: - type: node_id - defaultValue: 0xC00FEE + cluster: "Basic Information" endpoint: 0 - waitAfterCommissioning: - type: int16u - defaultValue: 5000 - discriminator: - type: int16u - defaultValue: 3840 - payload: - type: char_string - defaultValue: "MT:-24J0AFN00KA0648G00" - PakeVerifier: - type: octet_string - defaultValue: "hex:b96170aae803346884724fe9a3b287c30330c2a660375d17bb205a8cf1aecb350457f8ab79ee253ab6a8e46bb09e543ae422736de501e3db37d441fe344920d09548e4c18240630c4ff4913c53513839b7c07fcc0627a1b8573a149fcd1fa466cf" tests: - - label: "Precondition: Reset Devices to factory defaults" - PICS: PICS_SDK_CI_ONLY - cluster: "SystemCommands" - command: "FactoryReset" - - - label: "Precondition: Reset Devices to factory defaults" + - label: "Precondition" verification: | Reset Devices to factory defaults - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Factory Reset the DUT and enter 'y' after success" - - name: "expectedValue" - value: "y" + disabled: true - label: "TH_CR1 starts a commissioning process with DUT_CE" PICS: CADMIN.S - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "TH_CR1 opens a commissioning window on DUT_CE using ECM" + verification: | + "1. Provision the DUT_CE (all-cluster-app) device using TH_CR1 (chip-tool ) on the raspi" + disabled: true + + - label: + "TH_CR1 opens a commissioning window on DUT_CE using a commissioning + timeout of PIXIT.CADMIN.CwDuration seconds using ECM" PICS: CADMIN.S.C00.Rsp - cluster: "Administrator Commissioning" - command: "OpenCommissioningWindow" - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "CommissioningTimeout" - value: 180 - - name: "PAKEPasscodeVerifier" - value: PakeVerifier - - name: "Discriminator" - value: discriminator - - name: "Iterations" - value: 1000 - - name: "Salt" - value: "SPAKE2P Key Salt" - - - label: "Waiting after opening commissioning window" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: waitAfterCommissioning - - #Check for DNS-SD advertisement CM is not possible in YAML - - label: "Verify that the DNS-SD advertisement shows CM=2" verification: | On TH_CR1 send the below command - grl@grl-ThinkPad-L480:~/2nd_cntrl/connectedhomeip/examples/chip-tool/out/debug$ avahi-browse -rt _matterc._udp + ./chip-tool pairing open-commissioning-window 1 1 180 1000 3840 + + Verify the Open commisioning window on the DUT_CE(all-cluster-app) Log: + + [1660904553.796857][3537:3537] CHIP:DMG: Received command for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 + [1660904553.796951][3537:3537] CHIP:ZCL: Received command to open commissioning window + [1660904553.797255][3537:3537] CHIP:IN: SecureSession[0xaaab142ef7f0]: Allocated Type:1 LSID:34523 + + Verify the Manual pairing code on the TH_CR1(chip-tool) Log: + + [1635864513.699433][3850:3855] CHIP:DMG: ICR moving to [CommandSen] + [1635864513.699489][3850:3855] CHIP:CTL: Manual pairing code: [36177160937] + [1635864513.699566][3850:3855] CHIP:CTL: SetupQRCode: [MT:00000CQM00YZN476420] + [1635864513.699636][3850:3855] CHIP:EM: Sending Standalone Ack for MessageCounter:2599714227 on exchange 60688i + [1635864513.699685][3850:3855] CHIP:IN: Prepared plaintext message 0xffff8a7cd960 to 0x0000000000000000 of type + disabled: true + + - label: "DNS-SD records shows DUT_CE advertising" + verification: | + On TH_CR1 send the below command + + avahi-browse -rt _matterc._udp + wlp5s0 IPv6 C326228BDB082BF4 _matterc._udp local + wlp5s0 IPv6 7B6545A75C5330BE _matterc._udp local = wlp5s0 IPv6 7B6545A75C5330BE _matterc._udp local - hostname = [E45F010F27530000.local] - address = [fe80::e65f:1ff:fe0f:2755] - port = [5540] - txt = ["PI=" "PH=33" "CM=1" "D=3841" "T=1" "CRA=300" "CRI=5000" "VP=65521+32769"] + hostname = [E45F010F27530000.local] + address = [fe80::e65f:1ff:fe0f:2755] + port = [5540] + txt = ["PI=" "PH=33" "CM=1" "D=3841" "T=1" "CRA=300" "CRI=5000" "VP=65521+32769"] = wlp5s0 IPv6 C326228BDB082BF4 _matterc._udp local - hostname = [E45F010F27530000.local] - address = [fe80::e65f:1ff:fe0f:2755] - port = [5540] - txt = ["PI=" "PH=36" "CM=2" "D=3840" "T=1" "CRA=300" "CRI=5000" "VP=65521+32769"] + hostname = [E45F010F27530000.local] + address = [fe80::e65f:1ff:fe0f:2755] + port = [5540] + txt = ["PI=" "PH=36" "CM=2" "D=3840" "T=1" "CRA=300" "CRI=5000" "VP=65521+32769"] grl@grl-ThinkPad-L480:~/2nd_cntrl/connectedhomeip/examples/chip-tool/out/debug$ On TH_CR1 send the below command - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: "TH_CR3 starts a commissioning process with DUT_CE" - PICS: CADMIN.S - identity: "gamma" - cluster: "CommissionerCommands" - command: "PairWithCode" - arguments: - values: - - name: "nodeId" - value: nodeId3 - - name: "payload" - value: payload - - - label: "DUT_CE is commissioned to TH_CR3 on Fabric ID3 with Node ID3" - identity: "gamma" - cluster: "DelayCommands" - command: "WaitForCommissionee" + disabled: true + + - label: "TH_CR3 Commissions with DUT_CE" PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId3 + verification: | + On TH_CR3 send the below command + + ./chip-tool pairing code 3 35484132896 --commissioner-name gamma - - label: "TH_CR1 opens a commissioning window on DUT_CE using ECM" + Verify you got below message TH_CR3(chip-tool) log + Device commissioning completed with success + disabled: true + + - label: + "TH_CR1 opens a commissioning window on DUT_CE using a commissioning + timeout of PIXIT.CADMIN.CwDuration seconds using ECM and TH_CR2 + Commissions with DUT_CE" PICS: CADMIN.S.C00.Rsp - cluster: "Administrator Commissioning" - command: "OpenCommissioningWindow" - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "CommissioningTimeout" - value: 180 - - name: "PAKEPasscodeVerifier" - value: PakeVerifier - - name: "Discriminator" - value: discriminator - - name: "Iterations" - value: 1000 - - name: "Salt" - value: "SPAKE2P Key Salt" - - - label: "Waiting after opening commissioning window" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: waitAfterCommissioning - - - label: "TH_CR2 starts a commissioning process with DUT_CE" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: payload - - - label: "DUT_CE is commissioned to TH_CR2" - PICS: CADMIN.S - identity: "beta" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId2 - - - label: "TH_CR1 opens a commissioning window on DUT_CE using ECM" + verification: | + On TH_CR1 send the below command + + ./chip-tool pairing open-commissioning-window 1 1 180 1000 3840 + + Verify Manual pairing code on TH1(chip-tool) Log + + 0x0000000000000001 at monotonic time: 16129075 msec + [1635874557.417449][4549:4554] CHIP:DMG: ICR moving to [CommandSen] + [1635874557.417505][4549:4554] CHIP:CTL: Manual pairing code: [35484132896] + [1635874557.417577][4549:4554] CHIP:CTL: SetupQRCode: [MT:00000CQM00AT-F5A510] + + On TH_CR2 send the below command + + ./chip-tool pairing code 2 35484132896 --commissioner-name beta + + Verify you got below message on TH_CR2(chip-tool) log + Device commissioning completed with success + disabled: true + + - label: + "TH_CR1 opens a commissioning window on DUT_CE using a commissioning + timeout of PIXIT.CADMIN.CwDuration seconds using ECM" PICS: CADMIN.S.C00.Rsp - cluster: "Administrator Commissioning" - command: "OpenCommissioningWindow" - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "CommissioningTimeout" - value: 180 - - name: "PAKEPasscodeVerifier" - value: PakeVerifier - - name: "Discriminator" - value: discriminator - - name: "Iterations" - value: 1000 - - name: "Salt" - value: "SPAKE2P Key Salt" - - - label: "Waiting after opening commissioning window" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: waitAfterCommissioning + verification: | + On TH_CR1 send the below command + + ./chip-tool pairing open-commissioning-window 1 1 180 1000 3840 + + Verify the Open commisioning window on the DUT_CE(all-cluster-app) Log: + + [1660904553.796857][3537:3537] CHIP:DMG: Received command for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 + [1660904553.796951][3537:3537] CHIP:ZCL: Received command to open commissioning window + [1660904553.797255][3537:3537] CHIP:IN: SecureSession[0xaaab142ef7f0]: Allocated Type:1 LSID:34523 + + Verify the Manual pairing code on the TH_CR1(chip-tool) Log: + + [1635874557.417271][4549:4554] CHIP:IN: Sending encrypted msg 0xaaaac5947d10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 16129075 msec + [1635874557.417449][4549:4554] CHIP:DMG: ICR moving to [CommandSen] + [1635874557.417505][4549:4554] CHIP:CTL: Manual pairing code: [35484132896] + [1635874557.417577][4549:4554] CHIP:CTL: SetupQRCode: [MT:00000CQM00AT-F5A510] + disabled: true - label: "Before the expiration of PIXIT.CADMIN.CwDuration seconds which was set in step 5, TH_CR1 opens a 2nd commissioning window on DUT_CE using a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" PICS: CADMIN.S.C00.Rsp - cluster: "Administrator Commissioning" - command: "OpenCommissioningWindow" - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "CommissioningTimeout" - value: 180 - - name: "PAKEPasscodeVerifier" - value: PakeVerifier - - name: "Discriminator" - value: discriminator - - name: "Iterations" - value: 1000 - - name: "Salt" - value: "SPAKE2P Key Salt" - response: - error: FAILURE - clusterError: 2 + verification: | + On TH_CR1 send the below command + + Verify that the DUT_CE is rejecting the opening of second commissioning session with the response status 0x01 failure + + + ./chip-tool pairing open-commissioning-window 1 1 180 1000 3840 + + Verify cluster status 1 on TH_CR1(chip-tool) Log + + + [1650527291.952431][8566:8571] CHIP:DMG: + [1650527291.952458][8566:8571] CHIP:DMG: StatusIB = + [1650527291.952488][8566:8571] CHIP:DMG: { + [1650527291.952519][8566:8571] CHIP:DMG: status = 0x01 (FAILURE), + [1650527291.952555][8566:8571] CHIP:DMG: cluster-status = 0x2, + [1650527291.952578][8566:8571] CHIP:DMG: }, + [1650527291.952612][8566:8571] CHIP:DMG: + [1650527291.952634][8566:8571] CHIP:DMG: }, + disabled: true - label: "TH_CR1 reads the list of Fabrics on DUT_CE" - cluster: "Operational Credentials" PICS: OPCREDS.S.A0001 - command: "readAttribute" - attribute: "Fabrics" - fabricFiltered: false - response: - value: - [ - { Label: "", NodeID: nodeId }, - { Label: "", NodeID: nodeId3 }, - { Label: "", NodeID: nodeId2 }, - ] - constraints: - type: list + verification: | + On TH_CR1 send the below command + + ./chip-tool operationalcredentials read fabrics 1 0 --fabric-filtered 0 + + Verify the list of Fabrics consists of FabricIndex 1, FabricIndex 2, FabricIndex 3 on TH_CR1(chip-tool) log + + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 268962768 + [1650527361.425870][15792:15797] CHIP:TOO: Fabrics: 3 entries + [1650527361.426777][15792:15797] CHIP:TOO: [1]: { + [1650527361.426859][15792:15797] CHIP:TOO: RootPublicKey: 0429A71383F336D80918C9EC655112513E428C073AF7FB44820EC793535302C6E3825C56EE6DD1A683EAA7B59E3F261B46FFA24A6D911E8D88839F4C1B3C84BA01 + [1650527361.426923][15792:15797] CHIP:TOO: VendorId: 65521 + [1650527361.426979][15792:15797] CHIP:TOO: FabricId: 1 + [1650527361.427033][15792:15797] CHIP:TOO: NodeId: 1 + [1650527361.427088][15792:15797] CHIP:TOO: Label: + [1650527361.427166][15792:15797] CHIP:TOO: FabricIndex: 1 + [1650527361.427376][15792:15797] CHIP:TOO: } + [1650527361.427464][15792:15797] CHIP:TOO: [2]: { + [1650527361.427532][15792:15797] CHIP:TOO: RootPublicKey: 04781BCEE70118049ED61DD5B4E401CF1A09D2F78AE7F5770BE5506AD24238E5E0777277DABAFD062659651C95CC2CA7DEAACE40DB579A946CC07CADB141BE05D7 + [1650527361.427595][15792:15797] CHIP:TOO: VendorId: 65521 + [1650527361.427649][15792:15797] CHIP:TOO: FabricId: 1 + [1650527361.427703][15792:15797] CHIP:TOO: NodeId: 3 + [1650527361.427756][15792:15797] CHIP:TOO: Label: + [1650527361.427811][15792:15797] CHIP:TOO: FabricIndex: 2 + [1650527361.427868][15792:15797] CHIP:TOO: } + [1650527361.427943][15792:15797] CHIP:TOO: [3]: { + [1650527361.428008][15792:15797] CHIP:TOO: RootPublicKey: 0403EDB5B461030A34EF7EA2F9DB0D46A36185E4755C365AF9344C4959F049EF21D55EAB903A2C7FBFC305EEFA42989250D7517A73E6156062390A60C0D4C41EBD + [1650527361.428067][15792:15797] CHIP:TOO: VendorId: 65521 + [1650527361.428122][15792:15797] CHIP:TOO: FabricId: 1 + [1650527361.428176][15792:15797] CHIP:TOO: NodeId: 2 + [1650527361.428229][15792:15797] CHIP:TOO: Label: + [1650527361.428282][15792:15797] CHIP:TOO: FabricIndex: 3 + [1650527361.428335][15792:15797] CHIP:TOO: } + disabled: true - label: "Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that was set in step 6" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 180000 + verification: | + Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that was set in step 6 + disabled: true - label: "TH_CR1 re-opens a commissioning window on DUT_CE using a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM" PICS: CADMIN.S.C01.Rsp - cluster: "Administrator Commissioning" - command: "OpenBasicCommissioningWindow" - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "CommissioningTimeout" - value: 180 - - - label: "Waiting after opening commissioning window" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: waitAfterCommissioning - - #Check for DNS-SD advertisement CM is not possible in YAML - - label: "Verify that the DNS-SD advertisement shows CM=1" verification: | On TH_CR1 send the below command - ubuntu@ubuntu:~/may16_cntrl/connectedhomeip/examples/chip-tool/out/debug$ avahi-browse -rt _matterc._udp + + ./chip-tool administratorcommissioning open-basic-commissioning-window 500 1 0 --timedInteractionTimeoutMs 1000 + + Verify the Open commisioning window on the DUT_CE(all-cluster-app) Log: + + [1660904553.796857][3537:3537] CHIP:DMG: Received command for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 + [1660904553.796951][3537:3537] CHIP:ZCL: Received command to open commissioning window + [1660904553.797255][3537:3537] CHIP:IN: SecureSession[0xaaab142ef7f0]: Allocated Type:1 LSID:34523 + + Verify the Manual pairing code on the TH_CR1(chip-tool) Log: + + [1650278416.249347][11064:11069] CHIP:DMG: }, + [1650278416.249430][11064:11069] CHIP:DMG: + [1650278416.249501][11064:11069] CHIP:DMG: StatusIB = + [1650278416.249581][11064:11069] CHIP:DMG: { + [1650278416.249664][11064:11069] CHIP:DMG: status = 0x00 (SUCCESS), + [1650278416.249738][11064:11069] CHIP:DMG: }, + [1650278416.249823][11064:11069] CHIP:DMG: + disabled: true + + - label: "DNS-SD records shows DUT_CE advertising" + verification: | + On TH_CR1 send the below command + avahi-browse -rt _matterc._udp + eth0 IPv6 2664ED6939FC373C _matterc._udp local = eth0 IPv6 2664ED6939FC373C _matterc._udp local - hostname = [E45F010F27530000.local] - address = [fe80::e65f:1ff:fe0f:2753] - port = [5540] - txt = ["PI=" "PH=36" "CM=1" "D=3840" "T=1" "SAI=300" "SII=5000" "VP=65521+32769"] + hostname = [E45F010F27530000.local] + address = [fe80::e65f:1ff:fe0f:2753] + port = [5540] + txt = ["PI=" "PH=36" "CM=1" "D=3840" "T=1" "SAI=300" "SII=5000" "VP=65521+32769"] ubuntu@ubuntu:~/may16_cntrl/connectedhomeip/examples/chip-tool/out/debug$ - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "enter 'y' after success" - - name: "expectedValue" - value: "y" + disabled: true - label: "Before the expiration of PIXIT.CADMIN.CwDuration seconds that was set in step 10, TH_CR3 opens a 2nd commissioning window on DUT_CE using a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM" PICS: CADMIN.S.C01.Rsp - identity: "gamma" - cluster: "Administrator Commissioning" - command: "OpenBasicCommissioningWindow" - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "CommissioningTimeout" - value: 180 - response: - error: FAILURE - clusterError: 2 + verification: | + On TH_CR3 send the below command + + ./chip-tool administratorcommissioning open-basic-commissioning-window 500 3 0 --timedInteractionTimeoutMs 1000 --commissioner-name gamma + + Verify that the DUT_CE is rejecting the opening of second commissioning session with the response status 0x01 failure + + + + [1650527565.991042][24618:24623] CHIP:DMG: { + [1650527565.991112][24618:24623] CHIP:DMG: EndpointId = 0x0, + [1650527565.991186][24618:24623] CHIP:DMG: ClusterId = 0x3c, + [1650527565.991257][24618:24623] CHIP:DMG: CommandId = 0x1, + [1650527565.991332][24618:24623] CHIP:DMG: }, + [1650527565.991441][24618:24623] CHIP:DMG: + [1650527565.991505][24618:24623] CHIP:DMG: StatusIB = + [1650527565.991574][24618:24623] CHIP:DMG: { + [1650527565.991645][24618:24623] CHIP:DMG: status = 0x01 (FAILURE), + [1650527565.991743][24618:24623] CHIP:DMG: cluster-status = 0x2, + [1650527565.991830][24618:24623] CHIP:DMG: }, + [1650527565.991918][24618:24623] CHIP:DMG: + [1650527565.991976][24618:24623] CHIP:DMG: }, + [1650527565.992061][24618:24623] CHIP:DMG: + [1650527565.992116][24618:24623] CHIP:DMG: }, + disabled: true - label: "Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that was set in step 11" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 180000 + verification: | + Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that was set in step 11 + disabled: true - label: "TH_CR1 reads the list of Fabrics on DUT_CE" - cluster: "Operational Credentials" PICS: OPCREDS.S.A0001 - command: "readAttribute" - attribute: "Fabrics" - fabricFiltered: false - response: - value: - [ - { Label: "", NodeID: nodeId }, - { Label: "", NodeID: nodeId3 }, - { Label: "", NodeID: nodeId2 }, - ] - constraints: - type: list - - - label: "TH_CR1 opens a commissioning window on DUT_CE using BCM" + verification: | + On TH_CR1 send the below command + + ./chip-tool operationalcredentials read fabrics 1 0 --fabric-filtered 0 + + Verify the list of Fabrics consists of FabricIndex 1, FabricIndex 2, FabricIndex 3 on TH_CR1(chip-tool) log + + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 268962768 + [1678866402.096093][704851:704853] CHIP:TOO: Fabrics: 3 entries + [1678866402.096119][704851:704853] CHIP:TOO: [1]: { + [1678866402.096131][704851:704853] CHIP:TOO: RootPublicKey: 045F808373B5CED7FC2AFF99D98C2DEE6CA3889A9B078E87DAD9E263C9DEDB47AD7D31703024B72F4CB68A3017963128748FC7E97C6CBB419AF8AA914CE67D7457 + [1678866402.096141][704851:704853] CHIP:TOO: VendorID: 65521 + [1678866402.096147][704851:704853] CHIP:TOO: FabricID: 1 + [1678866402.096154][704851:704853] CHIP:TOO: NodeID: 1 + [1678866402.096160][704851:704853] CHIP:TOO: Label: + [1678866402.096167][704851:704853] CHIP:TOO: FabricIndex: 1 + [1678866402.096173][704851:704853] CHIP:TOO: } + [1678866402.096185][704851:704853] CHIP:TOO: [2]: { + [1678866402.096194][704851:704853] CHIP:TOO: RootPublicKey: 0458F2B4AD99F579EC01AA271EFDDF14526CE5222BADE218C703902544430F32FA9B951963C6C03713AC63E2D95785CFCD997946098957C4F5844BD2B3916B7148 + [1678866402.096201][704851:704853] CHIP:TOO: VendorID: 65521 + [1678866402.096207][704851:704853] CHIP:TOO: FabricID: 3 + [1678866402.096213][704851:704853] CHIP:TOO: NodeID: 3 + [1678866402.096219][704851:704853] CHIP:TOO: Label: + [1678866402.096224][704851:704853] CHIP:TOO: FabricIndex: 2 + [1678866402.096230][704851:704853] CHIP:TOO: } + [1678866402.096241][704851:704853] CHIP:TOO: [3]: { + [1678866402.096250][704851:704853] CHIP:TOO: RootPublicKey: 04CE10BA136D610089C4810BF963C354CE93BA61D267E8B9594977E3CC5FF30741941CE3D2A0A9E62A66AEF02CAA9F25A614F033D304D9F2ACF4204FAB68E8F773 + [1678866402.096257][704851:704853] CHIP:TOO: VendorID: 65521 + [1678866402.096263][704851:704853] CHIP:TOO: FabricID: 2 + [1678866402.096269][704851:704853] CHIP:TOO: NodeID: 2 + [1678866402.096274][704851:704853] CHIP:TOO: Label: + [1678866402.096280][704851:704853] CHIP:TOO: FabricIndex: 3 + [1678866402.096286][704851:704853] CHIP:TOO: } + disabled: true + + - label: + "TH_CR1 opens a commissioning window on DUT_CE using a commissioning + timeout of PIXIT.CADMIN.CwDuration seconds using BCM" PICS: CADMIN.S.C01.Rsp - cluster: "Administrator Commissioning" - command: "OpenBasicCommissioningWindow" - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "CommissioningTimeout" - value: 180 - - - label: "Waiting after opening commissioning window" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: waitAfterCommissioning + verification: | + On TH_CR1 send the below command + + ./chip-tool administratorcommissioning open-basic-commissioning-window 500 1 0 --timedInteractionTimeoutMs 1000 + + Verify success response On TH_CR1(chip-tool) Log + + [1650278416.249268][11064:11069] CHIP:DMG: CommandId = 0x1, + [1650278416.249347][11064:11069] CHIP:DMG: }, + [1650278416.249430][11064:11069] CHIP:DMG: + [1650278416.249501][11064:11069] CHIP:DMG: StatusIB = + [1650278416.249581][11064:11069] CHIP:DMG: { + [1650278416.249664][11064:11069] CHIP:DMG: status = 0x00 (SUCCESS), + [1650278416.249738][11064:11069] CHIP:DMG: }, + [1650278416.249823][11064:11069] CHIP:DMG: + disabled: true - label: "Before the expiration of PIXIT.CADMIN.CwDuration seconds that was set in step 14, TH_CR2 opens a second commissioning window on DUT_CE using a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM" PICS: CADMIN.S.C01.Rsp - identity: "beta" - cluster: "Administrator Commissioning" - command: "OpenBasicCommissioningWindow" - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "CommissioningTimeout" - value: 180 - response: - error: FAILURE - clusterError: 2 + verification: | + On TH_CR2 send the below command + + ./chip-tool administratorcommissioning open-basic-commissioning-window 500 2 0 --timedInteractionTimeoutMs 1000 --commissioner-name beta + + + Verify that the DUT_CE is rejecting the opening of second commissioning session with the response status 0x01 failure + + [1650527622.374682][15824:15829] CHIP:DMG: }, + [1650527622.374799][15824:15829] CHIP:DMG: + [1650527622.374896][15824:15829] CHIP:DMG: StatusIB = + [1650527622.374979][15824:15829] CHIP:DMG: { + [1650527622.375086][15824:15829] CHIP:DMG: status = 0x01 (FAILURE), + [1650527622.375236][15824:15829] CHIP:DMG: cluster-status = 0x2, + [1650527622.375320][15824:15829] CHIP:DMG: }, + [1650527622.375426][15824:15829] CHIP:DMG: + [1650527622.375527][15824:15829] CHIP:DMG: }, + [1650527622.375616][15824:15829] CHIP:DMG: + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_12.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_12.yaml index 1020e53022c33c..020d23eb48ee27 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_12.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_12.yaml @@ -301,7 +301,7 @@ tests: Below are the example command for using single RPI as multiple controller. Vendor should have the provision to use the equivalent command in their DUT or use multiple commissioners/controllers - ./chip-tool administratorcommissioning open-basic-commissioning-window 500 2 0 --timedInteractionTimeoutMs 1000 + ./chip-tool administratorcommissioning open-basic-commissioning-window 500 1 0 --timedInteractionTimeoutMs 1000 Verify the Open commisioning window on the TH_CE(all-cluster-app) Log: diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml index 91c60edfcd417f..9e1e83daf81554 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_13.yaml @@ -23,94 +23,60 @@ PICS: config: nodeId: 0x12344321 - timeout: 600 - nodeIdForDuplicateCommissioning: - type: node_id - defaultValue: 0x11 - nodeId2: - type: node_id - defaultValue: 0xCAFE - nodeId3: - type: node_id - defaultValue: 0xC00FEE + cluster: "Basic Information" endpoint: 0 - waitAfterCommissioning: - type: int16u - defaultValue: 5000 - discriminator: - type: int16u - defaultValue: 3840 - payload: - type: char_string - defaultValue: "MT:-24J0AFN00KA0648G00" - PakeVerifier: - type: octet_string - defaultValue: "hex:b96170aae803346884724fe9a3b287c30330c2a660375d17bb205a8cf1aecb350457f8ab79ee253ab6a8e46bb09e543ae422736de501e3db37d441fe344920d09548e4c18240630c4ff4913c53513839b7c07fcc0627a1b8573a149fcd1fa466cf" tests: - - label: "Precondition: Reset Devices to factory defaults" - PICS: PICS_SDK_CI_ONLY - cluster: "SystemCommands" - command: "FactoryReset" - - - label: "Precondition: Reset Devices to factory defaults" + - label: "Precondition" verification: | Reset Devices to factory defaults - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Factory Reset the DUT and enter 'y' after success" - - name: "expectedValue" - value: "y" + disabled: true - label: "TH_CR1 starts a commissioning process with DUT_CE" - identity: "alpha" - cluster: "DelayCommands" - command: "WaitForCommissionee" PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "TH_CR1 opens a commissioning window on DUT_CE" - identity: "alpha" - cluster: "Administrator Commissioning" - command: "OpenBasicCommissioningWindow" - timedInteractionTimeoutMs: 10000 + verification: | + "1. Provision the DUT_CE (all-cluster-app) device using TH_CR1 (chip-tool ) on the raspi" + disabled: true + + - label: + "TH_CR1 opens a commissioning window on DUT_CE using a commissioning + timeout of PIXIT.CADMIN.CwDuration seconds using BCM" PICS: CADMIN.S.C01.Rsp - arguments: - values: - - name: "CommissioningTimeout" - value: 180 - - - label: "Waiting after opening commissioning window" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: waitAfterCommissioning + verification: | + On TH_CR1 send the below command + + ./chip-tool administratorcommissioning open-basic-commissioning-window 500 1 0 --timedInteractionTimeoutMs 1000 + + Verify success response On TH_CR1(chip-tool) Log + + + [1650278416.249347][11064:11069] CHIP:DMG: }, + [1650278416.249430][11064:11069] CHIP:DMG: + [1650278416.249501][11064:11069] CHIP:DMG: StatusIB = + [1650278416.249581][11064:11069] CHIP:DMG: { + [1650278416.249664][11064:11069] CHIP:DMG: status = 0x00 (SUCCESS), + [1650278416.249738][11064:11069] CHIP:DMG: }, + [1650278416.249823][11064:11069] CHIP:DMG: + [1650278416.249889][11064:11069] CHIP:DMG: }, + disabled: true - label: "TH_CR1 reads WindowStatus attribute from DUT_CE" - cluster: "Administrator Commissioning" - command: "readAttribute" - attribute: "WindowStatus" PICS: CADMIN.S.A0000 - response: - value: 2 + verification: | + On TH_CR1 send the below command - #Need YAML support to save FabricId value from Fabrics list attribute - #Issue https://github.com/project-chip/connectedhomeip/issues/13029 - - label: - "TH_CR1 reads AdminFabricIndex attribute from DUT_CE and Verify TH_CR1 - reads the AdminFabricIndex value successfully and verify the value to - be the same as the Fabric Index of the Fabrics attribute list entry in - TH_CR1" - PICS: CADMIN.S.A0001 && PICS_USER_PROMPT + ./chip-tool administratorcommissioning read window-status 1 0 + + Verify on TH_CR1(chip-tool) log successfully reads the WindowStatus + + [1658838248.887740][9273:9278] CHIP:DMG: } + [1658838248.887888][9273:9278] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 2423106591 + [1658838248.887959][9273:9278] CHIP:TOO: WindowStatus: 2 + [1658838248.888038][9273:9278] CHIP:EM: Sending Standalone Ack for MessageCounter:253317720 on exchange 63644i + disabled: true + + - label: "TH_CR1 reads AdminFabricIndex attribute from DUT_CE" + PICS: CADMIN.S.A0001 verification: | On TH_CR1 send the below command @@ -140,22 +106,10 @@ tests: [1649245801.244521][10091:10096] CHIP:TOO: FabricIndex: 1 [1649245801.244552][10091:10096] CHIP:TOO: } [1649245801.244671][10091:10096] CHIP:EM: Sending Standalone Ack for MessageCounter:8407998 on exchange 12989i - cluster: "LogCommands" - command: "UserPrompt" - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - #Issue https://github.com/project-chip/connectedhomeip/issues/13029 - - label: - "TH_CR1 reads AdminVendorId attribute from DUT_CE and Verify TH_CR1 - reads the AdminVendorId value successfully and verify this value to be - the same as the Vendor ID field of Fabrics attribute list entry in - TH_CR1" - PICS: CADMIN.S.A0002 && PICS_USER_PROMPT + disabled: true + + - label: "TH_CR1 reads AdminVendorId attribute from DUT_CE" + PICS: CADMIN.S.A0002 verification: | On TH_CR1 send the below command @@ -184,351 +138,436 @@ tests: [1649245801.244521][10091:10096] CHIP:TOO: FabricIndex: 1 [1649245801.244552][10091:10096] CHIP:TOO: } [1649245801.244671][10091:10096] CHIP:EM: Sending Standalone Ack for MessageCounter:8407998 on exchange 12989i - cluster: "LogCommands" - command: "UserPrompt" - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - #Check for DNS-SD advertisement CM is not possible in YAML - - label: "Verify that the DNS-SD advertisement shows CM=1" + disabled: true + + - label: "DNS-SD records shows DUT_CE advertising" verification: | On TH_CR1 send the below command - grl@grl-ThinkPad-L480:~/2nd_cntrl/connectedhomeip/examples/chip-tool/out/debug$ avahi-browse -rt _matterc._udp + avahi-browse -rt _matterc._udp + wlp5s0 IPv6 C326228BDB082BF4 _matterc._udp local + wlp5s0 IPv6 7B6545A75C5330BE _matterc._udp local = wlp5s0 IPv6 7B6545A75C5330BE _matterc._udp local - hostname = [E45F010F27530000.local] - address = [fe80::e65f:1ff:fe0f:2755] - port = [5540] - txt = ["PI=" "PH=33" "CM=1" "D=3841" "T=1" "CRA=300" "CRI=5000" "VP=65521+32769"] + hostname = [E45F010F27530000.local] + address = [fe80::e65f:1ff:fe0f:2755] + port = [5540] + txt = ["PI=" "PH=33" "CM=1" "D=3841" "T=1" "CRA=300" "CRI=5000" "VP=65521+32769"] grl@grl-ThinkPad-L480:~/2nd_cntrl/connectedhomeip/examples/chip-tool/out/debug$ - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: "TH_CR3 starts a commissioning process with DUT_CE" - identity: "gamma" - cluster: "CommissionerCommands" - command: "PairWithCode" - arguments: - values: - - name: "nodeId" - value: nodeId3 - - name: "payload" - value: payload - - - label: "DUT_CE is commissioned to TH_CR3 on Fabric ID3 with Node ID3" - identity: "gamma" - cluster: "DelayCommands" - command: "WaitForCommissionee" + disabled: true + + - label: "TH_CR3 Commissions with DUT_CE" PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId3 - - - label: "TH_CR1 opens a commissioning window on DUT_CE" - identity: "alpha" - cluster: "Administrator Commissioning" - command: "OpenBasicCommissioningWindow" - timedInteractionTimeoutMs: 10000 + verification: | + On TH_CR3 send the below command + + ./chip-tool pairing onnetwork 3 20202021 --commissioner-name gamma + + Verify you got below message on TH_CR3(chip-tool) log + Device commissioning completed with success + disabled: true + + - label: + "TH_CR1 opens a commissioning window on DUT_CE using a commissioning + timeout of PIXIT.CADMIN.CwDuration seconds using BCM and TH_CR2 + Commissions with DUT_CE" PICS: CADMIN.S.C01.Rsp - arguments: - values: - - name: "CommissioningTimeout" - value: 180 - - - label: "Waiting after opening commissioning window" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: waitAfterCommissioning - - - label: "TH_CR2 starts a commissioning process with DUT_CE" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: payload - - - label: "DUT_CE is commissioned to TH_CR2 on Fabric ID2 with Node ID2" - identity: "beta" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId2 - - - label: "TH_CR1 opens a commissioning window on DUT_CE" - identity: "alpha" - cluster: "Administrator Commissioning" - command: "OpenBasicCommissioningWindow" - timedInteractionTimeoutMs: 10000 + verification: | + On TH_CR1 send the below command + ./chip-tool administratorcommissioning open-basic-commissioning-window 500 1 0 --timedInteractionTimeoutMs 1000 + + Verify success response On TH_CR1(chip-tool) Log + + CHIP:DMG: InvokeResponseMessage = + [1650278416.248379][11064:11069] CHIP:DMG: { + [1650278416.248436][11064:11069] CHIP:DMG: suppressResponse = false, + [1650278416.248495][11064:11069] CHIP:DMG: InvokeResponseIBs = + [1650278416.248570][11064:11069] CHIP:DMG: [ + [1650278416.248630][11064:11069] CHIP:DMG: InvokeResponseIB = + [1650278416.248718][11064:11069] CHIP:DMG: { + [1650278416.248783][11064:11069] CHIP:DMG: CommandStatusIB = + [1650278416.248860][11064:11069] CHIP:DMG: { + [1650278416.248931][11064:11069] CHIP:DMG: CommandPathIB = + [1650278416.249011][11064:11069] CHIP:DMG: { + [1650278416.249100][11064:11069] CHIP:DMG: EndpointId = 0x0, + [1650278416.249186][11064:11069] CHIP:DMG: ClusterId = 0x3c, + [1650278416.249268][11064:11069] CHIP:DMG: CommandId = 0x1, + [1650278416.249347][11064:11069] CHIP:DMG: }, + [1650278416.249430][11064:11069] CHIP:DMG: + [1650278416.249501][11064:11069] CHIP:DMG: StatusIB = + [1650278416.249581][11064:11069] CHIP:DMG: { + [1650278416.249664][11064:11069] CHIP:DMG: status = 0x00 (SUCCESS), + [1650278416.249738][11064:11069] CHIP:DMG: }, + [1650278416.249823][11064:11069] CHIP:DMG: + [1650278416.249889][11064:11069] CHIP:DMG: }, + [1650278416.249969][11064:11069] CHIP:DMG: + [1650278416.250035][11064:11069] CHIP:DMG: }, + [1650278416.250113][11064:11069] CHIP:DMG: + [1650278416.250169][11064:11069] CHIP:DMG: ], + [1650278416.250241][11064:11069] CHIP:DMG: + [1650278416.250298][11064:11069] CHIP:DMG: InteractionModelRevision = 1 + [1650278416.250355][11064:11069] CHIP:DMG: }, + [1650278416.250535][11064:11069] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x0 + [1650278416.250634][11064:11069] CHIP:DMG: ICR moving to [AwaitingDe] + + + On 2nd controller using chip tool connect to the accessory + ./chip-tool pairing onnetwork 2 20202021 --commissioner-name beta + + Verify you got below message on TH_CR2(chip-tool) log + Device commissioning completed with success + disabled: true + + - label: + "TH_CR1 opens a commissioning window on DUT_CE using a commissioning + timeout of PIXIT.CADMIN.CwDuration seconds using BCM" PICS: CADMIN.S.C01.Rsp - arguments: - values: - - name: "CommissioningTimeout" - value: 180 - - - label: "Waiting after opening commissioning window" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: waitAfterCommissioning - - - label: "TH_CR1 opens a 2nd commissioning window on DUT_CE" - identity: "alpha" - cluster: "Administrator Commissioning" - command: "OpenCommissioningWindow" - timedInteractionTimeoutMs: 10000 + verification: | + On TH_CR1 send the below command + + ./chip-tool administratorcommissioning open-basic-commissioning-window 500 1 0 --timedInteractionTimeoutMs 1000 + + Verify success response On TH_CR2(chip-tool) Log + + + [1650278416.249347][11064:11069] CHIP:DMG: }, + [1650278416.249430][11064:11069] CHIP:DMG: + [1650278416.249501][11064:11069] CHIP:DMG: StatusIB = + [1650278416.249581][11064:11069] CHIP:DMG: { + [1650278416.249664][11064:11069] CHIP:DMG: status = 0x00 (SUCCESS), + [1650278416.249738][11064:11069] CHIP:DMG: }, + [1650278416.249823][11064:11069] CHIP:DMG: + [1650278416.249889][11064:11069] CHIP:DMG: }, + disabled: true + + - label: + "Before the expiration of PIXIT.CADMIN.CwDuration seconds that is set + in step 9, TH_CR1 opens a 2nd commissioning window on DUT_CE using a + commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" PICS: CADMIN.S.C00.Rsp - arguments: - values: - - name: "CommissioningTimeout" - value: 180 - - name: "PAKEPasscodeVerifier" - value: PakeVerifier - - name: "Discriminator" - value: discriminator - - name: "Iterations" - value: 1000 - - name: "Salt" - value: "SPAKE2P Key Salt" - response: - error: FAILURE - clusterError: 2 + verification: | + On TH_CR1 send the below command + + ./chip-tool pairing open-commissioning-window 1 1 200 1000 3840 + + + Verify that the DUT_CE is rejecting the opening of second commissioning session with the response status 0x01 failure in TH_CR1(chip-tool) Log + + CHIP:DMG: InvokeResponseMessage = + [1650527622.373450][15824:15829] CHIP:DMG: { + [1650527622.373531][15824:15829] CHIP:DMG: suppressResponse = false, + [1650527622.373628][15824:15829] CHIP:DMG: InvokeResponseIBs = + [1650527622.373734][15824:15829] CHIP:DMG: [ + [1650527622.373817][15824:15829] CHIP:DMG: InvokeResponseIB = + [1650527622.373913][15824:15829] CHIP:DMG: { + [1650527622.374001][15824:15829] CHIP:DMG: CommandStatusIB = + [1650527622.374087][15824:15829] CHIP:DMG: { + [1650527622.374182][15824:15829] CHIP:DMG: CommandPathIB = + [1650527622.374296][15824:15829] CHIP:DMG: { + [1650527622.374382][15824:15829] CHIP:DMG: EndpointId = 0x0, + [1650527622.374490][15824:15829] CHIP:DMG: ClusterId = 0x3c, + [1650527622.374593][15824:15829] CHIP:DMG: CommandId = 0x1, + [1650527622.374682][15824:15829] CHIP:DMG: }, + [1650527622.374799][15824:15829] CHIP:DMG: + [1650527622.374896][15824:15829] CHIP:DMG: StatusIB = + [1650527622.374979][15824:15829] CHIP:DMG: { + [1650527622.375086][15824:15829] CHIP:DMG: status = 0x01 (FAILURE), + [1650527622.375236][15824:15829] CHIP:DMG: cluster-status = 0x2, + [1650527622.375320][15824:15829] CHIP:DMG: }, + [1650527622.375426][15824:15829] CHIP:DMG: + [1650527622.375527][15824:15829] CHIP:DMG: }, + [1650527622.375616][15824:15829] CHIP:DMG: + [1650527622.375704][15824:15829] CHIP:DMG: }, + [1650527622.375786][15824:15829] CHIP:DMG: + [1650527622.375864][15824:15829] CHIP:DMG: ], + [1650527622.375940][15824:15829] CHIP:DMG: + [1650527622.376000][15824:15829] CHIP:DMG: InteractionModelRevision = 1 + [1650527622.376058][15824:15829] CHIP:DMG: }, + [1650527622.376202][15824:15829] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x1 + [1650527622.376278][15824:15829] CHIP:TOO: Error: IM Error 0x00000601: Cluster-specific error: 0x01 + disabled: true - label: "TH_CR1 reads the list of Fabrics on DUT_CE" - identity: "alpha" - command: "readAttribute" - cluster: "Operational Credentials" - attribute: "Fabrics" - fabricFiltered: false PICS: OPCREDS.S.A0001 - response: - value: - [ - { Label: "", NodeID: nodeId }, - { Label: "", NodeID: nodeId3 }, - { Label: "", NodeID: nodeId2 }, - ] - constraints: - type: list - - - label: "Wait for the expiration of PIXIT.CADMIN.CwDuration seconds" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 180000 - - - label: "TH_CR1 re-opens new commissioning window on DUT_CE using ECM" - identity: "alpha" - cluster: "Administrator Commissioning" - command: "OpenCommissioningWindow" - timedInteractionTimeoutMs: 10000 + verification: | + On TH_CR1 send the below command + + ./chip-tool operationalcredentials read fabrics 1 0 --fabric-filtered 0 + + Verify the list of Fabrics consists of FabricIndex 1, FabricIndex 2, FabricIndex 3 on TH_CR1(chip-tool) log + + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 268962768 + [1650527361.425870][15792:15797] CHIP:TOO: Fabrics: 3 entries + [1650527361.426777][15792:15797] CHIP:TOO: [1]: { + [1650527361.426859][15792:15797] CHIP:TOO: RootPublicKey: 0429A71383F336D80918C9EC655112513E428C073AF7FB44820EC793535302C6E3825C56EE6DD1A683EAA7B59E3F261B46FFA24A6D911E8D88839F4C1B3C84BA01 + [1650527361.426923][15792:15797] CHIP:TOO: VendorId: 65521 + [1650527361.426979][15792:15797] CHIP:TOO: FabricId: 1 + [1650527361.427033][15792:15797] CHIP:TOO: NodeId: 1 + [1650527361.427088][15792:15797] CHIP:TOO: Label: + [1650527361.427166][15792:15797] CHIP:TOO: FabricIndex: 1 + [1650527361.427376][15792:15797] CHIP:TOO: } + [1650527361.427464][15792:15797] CHIP:TOO: [2]: { + [1650527361.427532][15792:15797] CHIP:TOO: RootPublicKey: 04781BCEE70118049ED61DD5B4E401CF1A09D2F78AE7F5770BE5506AD24238E5E0777277DABAFD062659651C95CC2CA7DEAACE40DB579A946CC07CADB141BE05D7 + [1650527361.427595][15792:15797] CHIP:TOO: VendorId: 65521 + [1650527361.427649][15792:15797] CHIP:TOO: FabricId: 1 + [1650527361.427703][15792:15797] CHIP:TOO: NodeId: 3 + [1650527361.427756][15792:15797] CHIP:TOO: Label: + [1650527361.427811][15792:15797] CHIP:TOO: FabricIndex: 2 + [1650527361.427868][15792:15797] CHIP:TOO: } + [1650527361.427943][15792:15797] CHIP:TOO: [3]: { + [1650527361.428008][15792:15797] CHIP:TOO: RootPublicKey: 0403EDB5B461030A34EF7EA2F9DB0D46A36185E4755C365AF9344C4959F049EF21D55EAB903A2C7FBFC305EEFA42989250D7517A73E6156062390A60C0D4C41EBD + [1650527361.428067][15792:15797] CHIP:TOO: VendorId: 65521 + [1650527361.428122][15792:15797] CHIP:TOO: FabricId: 1 + [1650527361.428176][15792:15797] CHIP:TOO: NodeId: 2 + [1650527361.428229][15792:15797] CHIP:TOO: Label: + [1650527361.428282][15792:15797] CHIP:TOO: FabricIndex: 3 + [1650527361.428335][15792:15797] CHIP:TOO: } + disabled: true + + - label: + "Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that was + set in step 9" + verification: | + Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that was set in step 9 + disabled: true + + - label: + "TH_CR1 re-opens a commissioning window on DUT_CE using a + commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" PICS: CADMIN.S.C00.Rsp - arguments: - values: - - name: "CommissioningTimeout" - value: 180 - - name: "PAKEPasscodeVerifier" - value: PakeVerifier - - name: "Discriminator" - value: discriminator - - name: "Iterations" - value: 1000 - - name: "Salt" - value: "SPAKE2P Key Salt" - - - label: "Waiting after opening commissioning window" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: waitAfterCommissioning + verification: | + On TH_CR1 send the below command + + + ./chip-tool pairing open-commissioning-window 1 1 200 1000 3840 + + Verify Manual pairing code on TH_CR1(chip-tool) Log + + [1635925391.224232][9653:9658] CHIP:SC: Success status report received. Session was established + [1635925391.224273][9653:9658] CHIP:IN: New secure session created for device 0x0000000000000001, key 27!! + [1635925391.224367][9653:9658] CHIP:CTL: OpenCommissioningWindow for device ID 1 + [1635925391.231805][9653:9658] CHIP:DMG: ICR moving to [AddingComm] + [1635925391.231864][9653:9658] CHIP:DMG: ICR moving to [AddedComma] + [1635925391.231996][9653:9658] CHIP:IN: Prepared encrypted message 0xaaaae98fdd10 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 61177i with MessageCounter:0. + [1635925391.232051][9653:9658] CHIP:IN: Sending encrypted msg 0xaaaae98fdd10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 13126718 msec + [1635925391.232180][9653:9658] CHIP:DMG: ICR moving to [CommandSen] + [1635925391.232232][9653:9658] CHIP:CTL: Manual pairing code: [35976646436] + [1635925391.232299][9653:9658] CHIP:CTL: SetupQRCode: [MT:00000CQM0061ZN63N10] + disabled: true - label: "TH_CR1 reads WindowStatus attribute from DUT_CE" - cluster: "Administrator Commissioning" - command: "readAttribute" - attribute: "WindowStatus" - PICS: CADMIN.S.A0000 - response: - value: 1 + PICS: CADMIN.S.A0001 + verification: | + On TH_CR1 send the below command + + ./chip-tool administratorcommissioning read window-status 1 0 - #Check for DNS-SD advertisement CM is not possible in YAML - - label: "Verify that the DNS-SD advertisement shows CM=2" + Verify on TH_CR1(chip-tool) log successfully reads the WindowStatus + + [1658838248.887740][9273:9278] CHIP:DMG: } + [1658838248.887888][9273:9278] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 2423106591 + [1658838248.887959][9273:9278] CHIP:TOO: WindowStatus: 1 + [1658838248.888038][9273:9278] CHIP:EM: Sending Standalone Ack for MessageCounter:253317720 on exchange 63644i + disabled: true + + - label: "DNS-SD records shows DUT_CE advertising" verification: | On TH_CR1 send the below command - grl@grl-ThinkPad-L480:~/2nd_cntrl/connectedhomeip/examples/chip-tool/out/debug$ avahi-browse -rt _matterc._udp + avahi-browse -rt _matterc._udp + wlp5s0 IPv6 C326228BDB082BF4 _matterc._udp local + wlp5s0 IPv6 7B6545A75C5330BE _matterc._udp local = wlp5s0 IPv6 7B6545A75C5330BE _matterc._udp local - hostname = [E45F010F27530000.local] - address = [fe80::e65f:1ff:fe0f:2755] - port = [5540] - txt = ["PI=" "PH=33" "CM=1" "D=3841" "T=1" "CRA=300" "CRI=5000" "VP=65521+32769"] + hostname = [E45F010F27530000.local] + address = [fe80::e65f:1ff:fe0f:2755] + port = [5540] + txt = ["PI=" "PH=33" "CM=1" "D=3841" "T=1" "CRA=300" "CRI=5000" "VP=65521+32769"] = wlp5s0 IPv6 C326228BDB082BF4 _matterc._udp local - hostname = [E45F010F27530000.local] - address = [fe80::e65f:1ff:fe0f:2755] - port = [5540] - txt = ["PI=" "PH=36" "CM=2" "D=3840" "T=1" "CRA=300" "CRI=5000" "VP=65521+32769"] + hostname = [E45F010F27530000.local] + address = [fe80::e65f:1ff:fe0f:2755] + port = [5540] + txt = ["PI=" "PH=36" "CM=2" "D=3840" "T=1" "CRA=300" "CRI=5000" "VP=65521+32769"] grl@grl-ThinkPad-L480:~/2nd_cntrl/connectedhomeip/examples/chip-tool/out/debug$ - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: "TH_CR3 opens a 2nd commissioning window on DUT_CE" - identity: "gamma" - cluster: "Administrator Commissioning" - command: "OpenCommissioningWindow" - timedInteractionTimeoutMs: 10000 + disabled: true + + - label: + "Before the expiration of PIXIT.CADMIN.CwDuration seconds that is set + in step 13, TH_CR3 opens a 2nd commissioning window on DUT_CE using a + commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" PICS: CADMIN.S.C00.Rsp - arguments: - values: - - name: "CommissioningTimeout" - value: 180 - - name: "PAKEPasscodeVerifier" - value: PakeVerifier - - name: "Discriminator" - value: discriminator - - name: "Iterations" - value: 1000 - - name: "Salt" - value: "SPAKE2P Key Salt" - response: - error: FAILURE - clusterError: 2 + verification: | + On TH_CR3 send the below command + + ./chip-tool pairing open-commissioning-window 3 1 200 1000 3840 --commissioner-name gamma + + Verify that the DUT_CE is rejecting the opening of second commissioning session with the response status 0x01 failure in TH_CR3(chip-tool) Log + + CHIP:DMG: InvokeResponseMessage = + [1650527622.373450][15824:15829] CHIP:DMG: { + [1650527622.373531][15824:15829] CHIP:DMG: suppressResponse = false, + [1650527622.373628][15824:15829] CHIP:DMG: InvokeResponseIBs = + [1650527622.373734][15824:15829] CHIP:DMG: [ + [1650527622.373817][15824:15829] CHIP:DMG: InvokeResponseIB = + [1650527622.373913][15824:15829] CHIP:DMG: { + [1650527622.374001][15824:15829] CHIP:DMG: CommandStatusIB = + [1650527622.374087][15824:15829] CHIP:DMG: { + [1650527622.374182][15824:15829] CHIP:DMG: CommandPathIB = + [1650527622.374296][15824:15829] CHIP:DMG: { + [1650527622.374382][15824:15829] CHIP:DMG: EndpointId = 0x0, + [1650527622.374490][15824:15829] CHIP:DMG: ClusterId = 0x3c, + [1650527622.374593][15824:15829] CHIP:DMG: CommandId = 0x1, + [1650527622.374682][15824:15829] CHIP:DMG: }, + [1650527622.374799][15824:15829] CHIP:DMG: + [1650527622.374896][15824:15829] CHIP:DMG: StatusIB = + [1650527622.374979][15824:15829] CHIP:DMG: { + [1650527622.375086][15824:15829] CHIP:DMG: status = 0x01 (FAILURE), + [1650527622.375236][15824:15829] CHIP:DMG: cluster-status = 0x2, + [1650527622.375320][15824:15829] CHIP:DMG: }, + [1650527622.375426][15824:15829] CHIP:DMG: + [1650527622.375527][15824:15829] CHIP:DMG: }, + [1650527622.375616][15824:15829] CHIP:DMG: + [1650527622.375704][15824:15829] CHIP:DMG: }, + [1650527622.375786][15824:15829] CHIP:DMG: + [1650527622.375864][15824:15829] CHIP:DMG: ], + [1650527622.375940][15824:15829] CHIP:DMG: + [1650527622.376000][15824:15829] CHIP:DMG: InteractionModelRevision = 1 + [1650527622.376058][15824:15829] CHIP:DMG: }, + [1650527622.376202][15824:15829] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x1 + [1650527622.376278][15824:15829] CHIP:TOO: Error: IM Error 0x00000601: Cluster-specific error: 0x01 + disabled: true - label: "TH_CR1 reads the list of Fabrics on DUT_CE" - identity: "alpha" - command: "readAttribute" - cluster: "Operational Credentials" - attribute: "Fabrics" - fabricFiltered: false PICS: OPCREDS.S.A0001 - response: - value: - [ - { Label: "", NodeID: nodeId }, - { Label: "", NodeID: nodeId3 }, - { Label: "", NodeID: nodeId2 }, - ] - constraints: - type: list - - - label: "Wait for the expiration of PIXIT_COMM_WIN seconds" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 180000 - - - label: "TH_CR1 opens a new commissioning window on DUT_CE" - identity: "alpha" - cluster: "Administrator Commissioning" - command: "OpenCommissioningWindow" - timedInteractionTimeoutMs: 10000 - PICS: CADMIN.S.C00.Rsp - arguments: - values: - - name: "CommissioningTimeout" - value: 180 - - name: "PAKEPasscodeVerifier" - value: PakeVerifier - - name: "Discriminator" - value: discriminator - - name: "Iterations" - value: 1000 - - name: "Salt" - value: "SPAKE2P Key Salt" - - - label: "Waiting after opening commissioning window" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: waitAfterCommissioning - - - label: "TH_CR2 opens a 2nd commissioning window on DUT_CE using ECM" - identity: "beta" - cluster: "Administrator Commissioning" - command: "OpenCommissioningWindow" - timedInteractionTimeoutMs: 10000 + verification: | + On TH_CR1 send the below command + + ./chip-tool operationalcredentials read fabrics 1 0 --fabric-filtered 0 + + Verify the list of Fabrics consists of FabricIndex 1, FabricIndex 2, FabricIndex 3 on TH_CR1(chip-tool) log + + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 268962768 + [1650527361.425870][15792:15797] CHIP:TOO: Fabrics: 3 entries + [1650527361.426777][15792:15797] CHIP:TOO: [1]: { + [1650527361.426859][15792:15797] CHIP:TOO: RootPublicKey: 0429A71383F336D80918C9EC655112513E428C073AF7FB44820EC793535302C6E3825C56EE6DD1A683EAA7B59E3F261B46FFA24A6D911E8D88839F4C1B3C84BA01 + [1650527361.426923][15792:15797] CHIP:TOO: VendorId: 65521 + [1650527361.426979][15792:15797] CHIP:TOO: FabricId: 1 + [1650527361.427033][15792:15797] CHIP:TOO: NodeId: 1 + [1650527361.427088][15792:15797] CHIP:TOO: Label: + [1650527361.427166][15792:15797] CHIP:TOO: FabricIndex: 1 + [1650527361.427376][15792:15797] CHIP:TOO: } + [1650527361.427464][15792:15797] CHIP:TOO: [2]: { + [1650527361.427532][15792:15797] CHIP:TOO: RootPublicKey: 04781BCEE70118049ED61DD5B4E401CF1A09D2F78AE7F5770BE5506AD24238E5E0777277DABAFD062659651C95CC2CA7DEAACE40DB579A946CC07CADB141BE05D7 + [1650527361.427595][15792:15797] CHIP:TOO: VendorId: 65521 + [1650527361.427649][15792:15797] CHIP:TOO: FabricId: 1 + [1650527361.427703][15792:15797] CHIP:TOO: NodeId: 3 + [1650527361.427756][15792:15797] CHIP:TOO: Label: + [1650527361.427811][15792:15797] CHIP:TOO: FabricIndex: 2 + [1650527361.427868][15792:15797] CHIP:TOO: } + [1650527361.427943][15792:15797] CHIP:TOO: [3]: { + [1650527361.428008][15792:15797] CHIP:TOO: RootPublicKey: 0403EDB5B461030A34EF7EA2F9DB0D46A36185E4755C365AF9344C4959F049EF21D55EAB903A2C7FBFC305EEFA42989250D7517A73E6156062390A60C0D4C41EBD + [1650527361.428067][15792:15797] CHIP:TOO: VendorId: 65521 + [1650527361.428122][15792:15797] CHIP:TOO: FabricId: 1 + [1650527361.428176][15792:15797] CHIP:TOO: NodeId: 2 + [1650527361.428229][15792:15797] CHIP:TOO: Label: + [1650527361.428282][15792:15797] CHIP:TOO: FabricIndex: 3 + [1650527361.428335][15792:15797] CHIP:TOO: } + disabled: true + + - label: + "Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that is + set in step 13" + verification: | + Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that is set in step 13 + disabled: true + + - label: + "TH_CR1 opens a commissioning window on DUT_CE using a commissioning + timeout of PIXIT.CADMIN.CwDuration seconds using ECM" + verification: | + On TH_CR1 send the below command + + ./chip-tool pairing open-commissioning-window 1 1 180 1000 3840 + + Verify Manual pairing code on TH_CR1(chip-tool) Log + + [1635925530.725036][9673:9678] CHIP:SC: Success status report received. Session was established + [1635925530.725071][9673:9678] CHIP:IN: New secure session created for device 0x0000000000000001, key 29!! + [1635925530.725168][9673:9678] CHIP:CTL: OpenCommissioningWindow for device ID 1 + [1635925530.732329][9673:9678] CHIP:DMG: ICR moving to [AddingComm] + [1635925530.732384][9673:9678] CHIP:DMG: ICR moving to [AddedComma] + [1635925530.732503][9673:9678] CHIP:IN: Prepared encrypted message 0xaaab0b9c2d10 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 39062i with MessageCounter:0. + [1635925530.732559][9673:9678] CHIP:IN: Sending encrypted msg 0xaaab0b9c2d10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 13266219 msec + [1635925530.732681][9673:9678] CHIP:DMG: ICR moving to [CommandSen] + [1635925530.732737][9673:9678] CHIP:CTL: Manual pairing code: [35484132896] + [1635925530.732807][9673:9678] CHIP:CTL: SetupQRCode: [MT:00000CQM0008YV45420] + disabled: true + + - label: + "Before the expiration of PIXIT.CADMIN.CwDuration seconds that is set + in step 19, TH_CR2 opens a second commissioning window on DUT_CE using + a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" PICS: CADMIN.S.C00.Rsp - arguments: - values: - - name: "CommissioningTimeout" - value: 180 - - name: "PAKEPasscodeVerifier" - value: PakeVerifier - - name: "Discriminator" - value: discriminator - - name: "Iterations" - value: 1000 - - name: "Salt" - value: "SPAKE2P Key Salt" - response: - error: FAILURE - clusterError: 2 - - - label: "Wait for the expiration of PIXIT.CADMIN.CwDuration seconds" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 180000 + verification: | + On TH_CR2 send the below command + + ./chip-tool pairing open-commissioning-window 2 1 180 1000 3840 --commissioner-name beta + + Verify that the DUT_CE is rejecting the opening of second commissioning session with the response status 0x01 failure in TH_CR2(chip-tool) Log + + [1650527622.374490][15824:15829] CHIP:DMG: ClusterId = 0x3c, + [1650527622.374593][15824:15829] CHIP:DMG: CommandId = 0x1, + [1650527622.374682][15824:15829] CHIP:DMG: }, + [1650527622.374799][15824:15829] CHIP:DMG: + [1650527622.374896][15824:15829] CHIP:DMG: StatusIB = + [1650527622.374979][15824:15829] CHIP:DMG: { + [1650527622.375086][15824:15829] CHIP:DMG: status = 0x01 (FAILURE), + [1650527622.375236][15824:15829] CHIP:DMG: cluster-status = 0x2, + [1650527622.375320][15824:15829] CHIP:DMG: }, + disabled: true + + - label: + "Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that is + set in step 19" + verification: | + Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that is set in step 19 + disabled: true - label: "TH_CR1 reads WindowStatus attribute from DUT_CE" - cluster: "Administrator Commissioning" - command: "readAttribute" - attribute: "WindowStatus" PICS: CADMIN.S.A0000 - response: - value: 0 + verification: | + On TH_CR1 send the below command + + ./chip-tool administratorcommissioning read window-status 1 0 + + Verify on TH_CR1(chip-tool) log successfully reads the WindowStatus + + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 2849200592 + [1651137648.760469][14047:14052] CHIP:TOO: WindowStatus: 0 + [1651137648.760534][14047:14052] CHIP:EM: Sending Standalone Ack for MessageCounter:5527412 on exchange 14590i" + disabled: true - label: "TH_CR1 reads AdminFabricIndex attribute from DUT_CE" - cluster: "Administrator Commissioning" - command: "readAttribute" - attribute: "AdminFabricIndex" PICS: CADMIN.S.A0001 - response: - value: null + verification: | + On TH_CR1 send the below command + + ./chip-tool administratorcommissioning read admin-fabric-index 1 0 + + Verify on TH_CR1(chip-tool) log successfully reads the AdminFabricIndex + + [1659097193.389295][11728:11733] CHIP:DMG: } + [1659097193.389588][11728:11733] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0001 DataVersion: 1299585105 + [1659097193.389731][11728:11733] CHIP:TOO: AdminFabricIndex: null + [1659097193.389913][11728:11733] CHIP:EM: Sending Standalone Ack for MessageCounter:195671426 on exchange 34244i + disabled: true - label: "TH_CR1 reads AdminVendorId attribute from DUT_CE" - cluster: "Administrator Commissioning" - command: "readAttribute" - attribute: "AdminVendorId" PICS: CADMIN.S.A0002 - response: - value: null + verification: | + On TH_CR1 send the below command + + ./chip-tool administratorcommissioning read admin-vendor-id 1 0 + + Verify on TH_CR1(chip-tool) log successfully reads the AdminVendorId + + [1658838521.588942][9317:9322] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0002 DataVersion: 2423106591 + [1658838521.589005][9317:9322] CHIP:TOO: AdminVendorId: null + [1658838521.589079][9317:9322] CHIP:EM: Sending Standalone Ack for MessageCounter:217165763 on exchange 55683i + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_15.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_15.yaml index 2372d67c0cc284..0ad164fb6fc810 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_15.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_15.yaml @@ -11,6 +11,7 @@ # 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: 30.1.15. [TC-CADMIN-1.15] Removing Fabrics from DUT and Fabric index @@ -21,241 +22,210 @@ PICS: config: nodeId: 0x12344321 - nodeId2: - type: node_id - defaultValue: 0xCAFE - nodeId3: - type: node_id - defaultValue: 0xC00FEE + cluster: "Basic Information" endpoint: 0 - waitAfterCommissioning: - type: int16u - defaultValue: 5000 - discriminator: - type: int16u - defaultValue: 3840 - payload: - type: char_string - defaultValue: "MT:-24J0AFN00KA0648G00" - PakeVerifier: - type: octet_string - defaultValue: "hex:b96170aae803346884724fe9a3b287c30330c2a660375d17bb205a8cf1aecb350457f8ab79ee253ab6a8e46bb09e543ae422736de501e3db37d441fe344920d09548e4c18240630c4ff4913c53513839b7c07fcc0627a1b8573a149fcd1fa466cf" tests: - - label: "Precondition: Reset Devices to factory defaults" - PICS: PICS_SDK_CI_ONLY - cluster: "SystemCommands" - command: "FactoryReset" - - - label: "Precondition: Reset Devices to factory defaults" + - label: "Precondition" verification: | Reset Devices to factory defaults - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Factory Reset the DUT and enter 'y' after success" - - name: "expectedValue" - value: "y" + disabled: true - label: "TH_CR1 starts a commissioning process with DUT_CE" - identity: "alpha" PICS: CADMIN.S - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "TH_CR1 opens a commissioning window on DUT_CE using ECM" - identity: "alpha" + verification: | + "1. Provision the device using TH_CR1 (Chip-tool as controller) + " + disabled: true + + - label: + "TH_CR1 opens a commissioning window on DUT_CE using a commissioning + timeout of PIXIT.CADMIN.CwDuration seconds using ECM" PICS: CADMIN.S.C00.Rsp - cluster: "Administrator Commissioning" - command: "OpenCommissioningWindow" - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "CommissioningTimeout" - value: 180 - - name: "PAKEPasscodeVerifier" - value: PakeVerifier - - name: "Discriminator" - value: discriminator - - name: "Iterations" - value: 1000 - - name: "Salt" - value: "SPAKE2P Key Salt" - - - label: "Waiting after opening commissioning window" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: waitAfterCommissioning + verification: | + On TH_CR1 chip tool, open commissioning window using ECM + + ./chip-tool pairing open-commissioning-window 1 1 180 1000 3840 + + Verify Manual pairing code on TH_CR1 (chip-tool) Log + + [1635925713.966786][9695:9700] CHIP:SC: Success status report received. Session was established + [1635925713.966839][9695:9700] CHIP:IN: New secure session created for device 0x0000000000000001, key 33!! + [1635925713.966938][9695:9700] CHIP:CTL: OpenCommissioningWindow for device ID 1 + [1635925713.972601][9695:9700] CHIP:DMG: ICR moving to [AddingComm] + [1635925713.972705][9695:9700] CHIP:DMG: ICR moving to [AddedComma] + [1635925713.972815][9695:9700] CHIP:IN: Prepared encrypted message 0xaaaad9b57d10 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 31056i with MessageCounter:0. + [1635925713.972876][9695:9700] CHIP:IN: Sending encrypted msg 0xaaaad9b57d10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 13449459 msec + [1635925713.973006][9695:9700] CHIP:DMG: ICR moving to [CommandSen] + [1635925713.973061][9695:9700] CHIP:CTL: Manual pairing code: [36217551633] + [1635925713.973120][9695:9700] CHIP:CTL: SetupQRCode: [MT:00000CQM00A7F87ZT10] + [1635925713.973178][9695:9700] CHIP:EM: Sending Standalone Ack for MessageCounter:1964916542 on exchange 31055i + disabled: true - label: "TH_CR2 starts a commissioning process with DUT_CE" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: payload - - - label: "DUT_CE is commissioned to TH_CR2" - identity: "beta" - PICS: CADMIN.S - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId2 - - - label: "TH_CR1 opens a commissioning window on DUT_CE using ECM" - identity: "alpha" + verification: | + On TH_CR2 using chip tool connect to the accessory + + + ./chip-tool pairing code 2 36217551633 --commissioner-name beta + + Verify you got below message on TH_CR2 (chip-tool) + Device commissioning completed with success + disabled: true + + - label: + "TH_CR1 opens a commissioning window on DUT_CE using a commissioning + timeout of PIXIT.CADMIN.CwDuration seconds using ECM" PICS: CADMIN.S.C00.Rsp - cluster: "Administrator Commissioning" - command: "OpenCommissioningWindow" - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "CommissioningTimeout" - value: 180 - - name: "PAKEPasscodeVerifier" - value: PakeVerifier - - name: "Discriminator" - value: discriminator - - name: "Iterations" - value: 1000 - - name: "Salt" - value: "SPAKE2P Key Salt" - - - label: "Waiting after opening commissioning window" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: waitAfterCommissioning - - - label: "TH_CR3 Commissions with DUT_CE" - PICS: CADMIN.S - identity: "gamma" - cluster: "CommissionerCommands" - command: "PairWithCode" - arguments: - values: - - name: "nodeId" - value: nodeId3 - - name: "payload" - value: payload - - - label: "DUT_CE is commissioned to TH_CR3" + verification: | + On TH_CR1 chip tool, open commissioning window using ECM + + ./chip-tool pairing open-commissioning-window 1 1 300 1000 3840 + + Verify Manual pairing code on TH_CR1 (chip-tool) Log + + [1635925713.966786][9695:9700] CHIP:SC: Success status report received. Session was established + [1635925713.966839][9695:9700] CHIP:IN: New secure session created for device 0x0000000000000001, key 33!! + [1635925713.966938][9695:9700] CHIP:CTL: OpenCommissioningWindow for device ID 1 + [1635925713.972601][9695:9700] CHIP:DMG: ICR moving to [AddingComm] + [1635925713.972705][9695:9700] CHIP:DMG: ICR moving to [AddedComma] + [1635925713.972815][9695:9700] CHIP:IN: Prepared encrypted message 0xaaaad9b57d10 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 31056i with MessageCounter:0. + [1635925713.972876][9695:9700] CHIP:IN: Sending encrypted msg 0xaaaad9b57d10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 13449459 msec + [1635925713.973006][9695:9700] CHIP:DMG: ICR moving to [CommandSen] + [1635925713.973061][9695:9700] CHIP:CTL: Manual pairing code: [36217551633] + [1635925713.973120][9695:9700] CHIP:CTL: SetupQRCode: [MT:00000CQM00A7F87ZT10] + [1635925713.973178][9695:9700] CHIP:EM: Sending Standalone Ack for MessageCounter:1964916542 on exchange 31055i + disabled: true + + - label: "TH_CR3 starts a commissioning process with DUT_CE" PICS: CADMIN.S - identity: "gamma" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId3 + verification: | + On TH_CR3 using chip tool connect to the accessory + + ./chip-tool pairing code 3 36217551633 --commissioner-name gamma + + Verify you got below message on TH_CR3 (chip-tool) side + Device commissioning completed with success + disabled: true - label: "TH_CR2 reads the list of Fabrics on DUT_CE" - identity: "beta" - cluster: "Operational Credentials" PICS: OPCREDS.S.A0001 - command: "readAttribute" - attribute: "Fabrics" - fabricFiltered: false - response: - value: - [ - { Label: "", FabricIndex: 1, NodeID: nodeId }, - { Label: "", FabricIndex: 2, NodeID: nodeId2 }, - { Label: "", FabricIndex: 3, NodeID: nodeId3 }, - ] - constraints: - type: list + verification: | + On TH_CR2 using chip tool, read fabrics list + + ./chip-tool operationalcredentials read fabrics 2 0 --fabric-filtered 0 --commissioner-name beta + + Verify the list of Fabrics consists of FabricIndex 1, FabricIndex 2, FabricIndex 3 on TH_CR2 (chip-tool) log + + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 2455995193 + CHIP:TOO: Fabrics: 3 entries + CHIP:TOO: [1]: { + CHIP:TOO: RootPublicKey: 04656F56DBDB677DC957028DFC0ED76709C72753C9194B117A483BDC07386BFD9529B68EB4448FBBA3964EFF37A56A8F461D348B0DAF3B56A75F3B94BF8209D36F + CHIP:TOO: VendorId: 65521 + CHIP:TOO: FabricId: 1 + CHIP:TOO: NodeId: 1 + CHIP:TOO: Label: + CHIP:TOO: FabricIndex: 1 + CHIP:TOO: } + CHIP:TOO: [2]: { + CHIP:TOO: RootPublicKey: 04F8F28D5D70A4510E0F72FBBA31369796C4206FF95D97B77C1BDFD0438A3BE43510631A1B915BE189323F4CC0E015480192654D8170F8F230C7713898962958B7 + CHIP:TOO: VendorId: 65521 + CHIP:TOO: FabricId: 1 + CHIP:TOO: NodeId: 2 + CHIP:TOO: Label: + CHIP:TOO: FabricIndex: 2 + CHIP:TOO: } + CHIP:TOO: [3]: { + CHIP:TOO: RootPublicKey: 04F8F28D5D70A4510E0F72FBBA31369796C4206FF95D97B77C1BDFD0438A3BE43510631A1B915BE189323F4CC0E015480192654D8170F8F230C7713898962958B7 + CHIP:TOO: VendorId: 65521 + CHIP:TOO: FabricId: 1 + CHIP:TOO: NodeId: 3 + CHIP:TOO: Label: + CHIP:TOO: FabricIndex: 3 + CHIP:TOO: } + CHIP:EM: Sending Standalone Ack for MessageCounter:9143157 on exchange 1147i + disabled: true - label: "TH_CR2 sends RemoveFabric with FabricIndex = 2 command to DUT_CE" PICS: OPCREDS.S.C0a.Rsp - identity: "beta" - cluster: "Operational Credentials" - command: "RemoveFabric" - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "FabricIndex" - value: 2 + verification: | + on TH_CR2 using chip tool, remove fabric with FabricIndex=2 + + ./chip-tool operationalcredentials remove-fabric 2 2 0 --commissioner-name beta + + Verify DUT_CE responses with NOCResponse with a StatusCode OK on TH_CR2 (chip-tool) log + + CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0008 + CHIP:TOO: NOCResponse: { + CHIP:TOO: statusCode: 0 + CHIP:TOO: fabricIndex: 2 + CHIP:TOO: } + CHIP:DMG: ICR moving to [AwaitingDe] + disabled: true - label: - "TH_CR2 writes the Basic Information Clusters NodeLabel mandatory - attribute of DUT_CE" + "TH_CR2 writes and reads the Basic Information Clusters NodeLabel + mandatory attribute of DUT_CE" PICS: BINFO.S.A0005 - identity: "beta" - command: "writeAttribute" - cluster: "Basic Information" - attribute: "NodeLabel" - arguments: - value: "chiptest" - response: - error: FAILURE - - #Issue https://github.com/project-chip/connectedhomeip/issues/21999 - - label: - "TH_CR2 reads the Basic Information Clusters NodeLabel mandatory - attribute of DUT_CE" - PICS: BINFO.S.A0005 && PICS_USER_PROMPT verification: | - Using TH_CR2 read attribute + Using TH_CR2 , write attribute and read attribute + + Verify read/write commands fail as expected since the DUT_CE is no longer on the network on TH_CR2 (chip-tool) side + + ./chip-tool basicinformation write node-label te5new 2 0 --commissioner-name beta + + [1678875950.655277][713499:713501] CHIP:SC: Received error (protocol code 1) during pairing process: ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1727: CHIP Error 0x000000C9: No shared trusted root + [1678875950.655290][713499:713501] CHIP:IN: SecureSession[0x7f5760026220]: Released - Type:2 LSID:1179 + [1678875950.655316][713499:713501] CHIP:-: ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1727: CHIP Error 0x000000C9: No shared trusted root at ../../commands/clusters/ModelCommand.cpp:62 - Verify read command fail as expected since the DUT_CE is no longer on the network on TH_CR2 (chip-tool) side ./chip-tool basicinformation read node-label 2 0 --commissioner-name beta - Received error (protocol code 2) during pairing process. ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1551: CHIP Error 0x00000054: Invalid CASE parameter - [1651819620.929567][4359:4364] CHIP:CTL: OperationalDeviceProxy[B8070CD13C99D367:0000000000000002]: State change 3 --> 2 - [1651819620.929700][4359:4364] CHIP:-: ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1551: CHIP Error 0x00000054: Invalid CASE parameter at ../../commands/clusters/ModelCommand.cpp:53 - cluster: "LogCommands" - command: "UserPrompt" - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" + [1678875950.655277][713499:713501] CHIP:SC: Received error (protocol code 1) during pairing process: ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1727: CHIP Error 0x000000C9: No shared trusted root + [1678875950.655290][713499:713501] CHIP:IN: SecureSession[0x7f5760026220]: Released - Type:2 LSID:1179 + [1678875950.655316][713499:713501] CHIP:-: ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1727: CHIP Error 0x000000C9: No shared trusted root at ../../commands/clusters/ModelCommand.cpp:62 + disabled: true - label: "TH_CR1 reads the list of Fabrics on DUT_CE" - identity: "alpha" PICS: OPCREDS.S.A0001 - cluster: "Operational Credentials" - command: "readAttribute" - attribute: "Fabrics" - fabricFiltered: false - response: - value: - [ - { Label: "", FabricIndex: 1, NodeID: nodeId }, - { Label: "", FabricIndex: 3, NodeID: nodeId3 }, - ] - constraints: - type: list - - #Check for DNS-SD advertisement is not possible in YAML + verification: | + On TH_CR1 using chip tool, read fabrics list + + Verify the list of Fabrics consists of FabricIndex 1, FabricIndex 3 on TH_CR1 (chip-tool) log + + ./chip-tool operationalcredentials read fabrics 1 0 --fabric-filtered 0 + + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 2455995219 + [1647863260.286772][9294:9299] CHIP:TOO: Fabrics: 2 entries + [1647863260.286908][9294:9299] CHIP:TOO: [1]: { + [1647863260.286947][9294:9299] CHIP:TOO: RootPublicKey: 04656F56DBDB677DC957028DFC0ED76709C72753C9194B117A483BDC07386BFD9529B68EB4448FBBA3964EFF37A56A8F461D348B0DAF3B56A75F3B94BF8209D36F + [1647863260.286995][9294:9299] CHIP:TOO: VendorId: 65521 + [1647863260.287026][9294:9299] CHIP:TOO: FabricId: 1 + [1647863260.287055][9294:9299] CHIP:TOO: NodeId: 1 + [1647863260.287084][9294:9299] CHIP:TOO: Label: + [1647863260.287113][9294:9299] CHIP:TOO: FabricIndex: 1 + [1647863260.287144][9294:9299] CHIP:TOO: } + [1647863260.287185][9294:9299] CHIP:TOO: [2]: { + [1647863260.287221][9294:9299] CHIP:TOO: RootPublicKey: 04F8F28D5D70A4510E0F72FBBA31369796C4206FF95D97B77C1BDFD0438A3BE43510631A1B915BE189323F4CC0E015480192654D8170F8F230C7713898962958B7 + [1647863260.287253][9294:9299] CHIP:TOO: VendorId: 65521 + [1647863260.287282][9294:9299] CHIP:TOO: FabricId: 1 + [1647863260.287310][9294:9299] CHIP:TOO: NodeId: 3 + [1647863260.287339][9294:9299] CHIP:TOO: Label: + [1647863260.287368][9294:9299] CHIP:TOO: FabricIndex: 3 + [1647863260.287396][9294:9299] CHIP:TOO: } + [1647863260.287515][9294:9299] CHIP:EM: Sending Standalone Ack for MessageCounter:11301761 on exchange 13180i" + disabled: true + - label: "Verify DUT_CE is now discoverable over DNS-SD with 2 Operational service records (_matter._tcp SRV records)." + PICS: CADMIN.S.C00.Rsp verification: | Execute the below command in any linux platform or in TH_CR1 - grl@grl-ThinkPad-L480:~/may16_cntrl03/connectedhomeip/examples/chip-tool/out/debug$ avahi-browse -rt _matter._tcp + avahi-browse -rt _matter._tcp + + wlp5s0 IPv6 8E50A59FAF52A809-0000000000000001 _matter._tcp local + wlp5s0 IPv6 03E707466A904C7E-0000000000000003 _matter._tcp local = wlp5s0 IPv6 8E50A59FAF52A809-0000000000000001 _matter._tcp local @@ -268,79 +238,77 @@ tests: address = [fe80::e65f:1ff:fe0f:2753] port = [5540] txt = ["T=1" "SAI=300" "SII=5000"] - grl@grl-ThinkPad-L480:~/may16_cntrl03/connectedhomeip/examples/chip-tool/out/debug$ - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: "TH_CR1 opens a commissioning window on DUT_CE using ECM" - identity: "alpha" + disabled: true + + - label: + "TH_CR1 opens a commissioning window on DUT_CE using a commissioning + timeout of PIXIT.CADMIN.CwDuration seconds using ECM" PICS: CADMIN.S.C00.Rsp - cluster: "Administrator Commissioning" - command: "OpenCommissioningWindow" - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "CommissioningTimeout" - value: 180 - - name: "PAKEPasscodeVerifier" - value: PakeVerifier - - name: "Discriminator" - value: discriminator - - name: "Iterations" - value: 1000 - - name: "Salt" - value: "SPAKE2P Key Salt" - - - label: "Waiting after opening commissioning window" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: waitAfterCommissioning + verification: | + On TH_CR1 chip tool, open commissioning window using ECM + + ./chip-tool pairing open-commissioning-window 1 1 180 1000 3840 + + Verify Manual pairing code on TH_CR1 (chip-tool) Log + + [1635925713.966786][9695:9700] CHIP:SC: Success status report received. Session was established + [1635925713.966839][9695:9700] CHIP:IN: New secure session created for device 0x0000000000000001, key 33!! + [1635925713.966938][9695:9700] CHIP:CTL: OpenCommissioningWindow for device ID 1 + [1635925713.972601][9695:9700] CHIP:DMG: ICR moving to [AddingComm] + [1635925713.972705][9695:9700] CHIP:DMG: ICR moving to [AddedComma] + [1635925713.972815][9695:9700] CHIP:IN: Prepared encrypted message 0xaaaad9b57d10 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 31056i with MessageCounter:0. + [1635925713.972876][9695:9700] CHIP:IN: Sending encrypted msg 0xaaaad9b57d10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 13449459 msec + [1635925713.973006][9695:9700] CHIP:DMG: ICR moving to [CommandSen] + [1635925713.973061][9695:9700] CHIP:CTL: Manual pairing code: [36217551633] + [1635925713.973120][9695:9700] CHIP:CTL: SetupQRCode: [MT:00000CQM00A7F87ZT10] + [1635925713.973178][9695:9700] CHIP:EM: Sending Standalone Ack for MessageCounter:1964916542 on exchange 31055i + disabled: true - label: "TH_CR2 starts a commissioning process with DUT_CE" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: payload - - - label: "DUT_CE is commissioned to TH_CR2" PICS: CADMIN.S - identity: "beta" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId2 + verification: | + On TH_CR2 using chip tool connect to the accessory + + ./chip-tool pairing code 2 36217551633 --commissioner-name beta + + Verify you got below message on TH_CR2 (chip-tool) side + Device commissioning completed with success + disabled: true - label: "TH_CR1 reads the list of Fabrics on DUT_CE" - identity: "alpha" PICS: OPCREDS.S.A0001 - cluster: "Operational Credentials" - command: "readAttribute" - attribute: "Fabrics" - fabricFiltered: false - response: - value: - [ - { Label: "", FabricIndex: 1, NodeID: nodeId }, - { Label: "", FabricIndex: 4, NodeID: nodeId2 }, - { Label: "", FabricIndex: 3, NodeID: nodeId3 }, - ] - constraints: - type: list + verification: | + On TH_CR1 , read fabrics list + + Verify the list shows FabricIndex=1, FabricIndex=3, FabricIndex=4 on TH_CR1 (chip-tool) side + + ./chip-tool operationalcredentials read fabrics 1 0 --fabric-filtered 0 + + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 2455995246 + [1647863342.980899][9309:9314] CHIP:TOO: Fabrics: 3 entries + [1647863342.981158][9309:9314] CHIP:TOO: [1]: { + [1647863342.981231][9309:9314] CHIP:TOO: RootPublicKey: 04656F56DBDB677DC957028DFC0ED76709C72753C9194B117A483BDC07386BFD9529B68EB4448FBBA3964EFF37A56A8F461D348B0DAF3B56A75F3B94BF8209D36F + [1647863342.981322][9309:9314] CHIP:TOO: VendorId: 65521 + [1647863342.981380][9309:9314] CHIP:TOO: FabricId: 1 + [1647863342.981434][9309:9314] CHIP:TOO: NodeId: 1 + [1647863342.981486][9309:9314] CHIP:TOO: Label: + [1647863342.981539][9309:9314] CHIP:TOO: FabricIndex: 1 + [1647863342.981594][9309:9314] CHIP:TOO: } + [1647863342.981671][9309:9314] CHIP:TOO: [2]: { + [1647863342.981737][9309:9314] CHIP:TOO: RootPublicKey: 04F8F28D5D70A4510E0F72FBBA31369796C4206FF95D97B77C1BDFD0438A3BE43510631A1B915BE189323F4CC0E015480192654D8170F8F230C7713898962958B7 + [1647863342.981796][9309:9314] CHIP:TOO: VendorId: 65521 + [1647863342.981849][9309:9314] CHIP:TOO: FabricId: 1 + [1647863342.981901][9309:9314] CHIP:TOO: NodeId: 3 + [1647863342.981952][9309:9314] CHIP:TOO: Label: + [1647863342.982005][9309:9314] CHIP:TOO: FabricIndex: 3 + [1647863342.982057][9309:9314] CHIP:TOO: } + [1647863342.982131][9309:9314] CHIP:TOO: [3]: { + [1647863342.982195][9309:9314] CHIP:TOO: RootPublicKey: 04F8F28D5D70A4510E0F72FBBA31369796C4206FF95D97B77C1BDFD0438A3BE43510631A1B915BE189323F4CC0E015480192654D8170F8F230C7713898962958B7 + [1647863342.982252][9309:9314] CHIP:TOO: VendorId: 65521 + [1647863342.982305][9309:9314] CHIP:TOO: FabricId: 1 + [1647863342.982357][9309:9314] CHIP:TOO: NodeId: 2 + [1647863342.982409][9309:9314] CHIP:TOO: Label: + [1647863342.982460][9309:9314] CHIP:TOO: FabricIndex: 4 + [1647863342.982512][9309:9314] CHIP:TOO: } + [1647863342.982738][9309:9314] CHIP:EM: Sending Standalone Ack for MessageCounter:5772016 on exchange 3310i + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_16.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_16.yaml index 1bd5b7371f33dd..dc92fa0d20775b 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_16.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_16.yaml @@ -150,6 +150,15 @@ tests: - name: "nodeId" value: nodeId3 + - label: + "TH3 reads CurrentFabricIndex attribute and save it for future use." + identity: "gamma" + command: "readAttribute" + cluster: "Operational Credentials" + attribute: "CurrentFabricIndex" + response: + saveAs: TH3FabricIndex + - label: "TH_CR2 reads the list of Fabrics on DUT_CE" identity: "beta" cluster: "Operational Credentials" @@ -272,6 +281,15 @@ tests: - name: "nodeId" value: nodeId2 + - label: + "TH2 reads CurrentFabricIndex attribute and save it for future use." + identity: "beta" + command: "readAttribute" + cluster: "Operational Credentials" + attribute: "CurrentFabricIndex" + response: + saveAs: TH2FabricIndex + - label: "TH_CR1 reads the list of Fabrics on DUT_CE" identity: "alpha" PICS: OPCREDS.S.A0001 @@ -288,3 +306,25 @@ tests: ] constraints: type: list + + - label: "Remove TH2 FabricIndex" + PICS: OPCREDS.S.C0a.Rsp && CADMIN.S + identity: "beta" + cluster: "Operational Credentials" + command: "RemoveFabric" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "FabricIndex" + value: TH2FabricIndex + + - label: "Remove TH3 FabricIndex" + PICS: OPCREDS.S.C0a.Rsp && CADMIN.S + identity: "gamma" + cluster: "Operational Credentials" + command: "RemoveFabric" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "FabricIndex" + value: TH3FabricIndex diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_17.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_17.yaml index 305b9cd683074d..af7a4672df53e9 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_17.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_17.yaml @@ -242,21 +242,17 @@ tests: Verify read/write commands fail as expected since the TH_CR2 is no longer on the network on TH_CE (all-clusters-app) - ./chip-tool basicinformation write node-label te5new 2 0 --commissioner-name beta + ./chip-tool basicinformation write node-label te5new 1 0 --commissioner-name beta - [1663571657.500021][3463:3463] CHIP:DL: NVS set: chip-counters/total-operational-hours = 0 (0x0) - [1663571657.500077][3463:3463] CHIP:DL: Inet Layer shutdown - [1663571657.500123][3463:3463] CHIP:DL: BLE shutdown - [1663571657.500168][3463:3463] CHIP:DL: System Layer shutdown - [1663571657.500383][3463:3463] CHIP:TOO: Run command failure: ../../examples/chip-tool/commands/common/CHIPCommand.cpp:454: CHIP Error 0x00000032: Timeout + [1678876803.495007][714337:714339] CHIP:SC: Received error (protocol code 1) during pairing process: ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1727: CHIP Error 0x000000C9: No shared trusted root + [1678876803.495018][714337:714339] CHIP:IN: SecureSession[0x7f2764026220]: Released - Type:2 LSID:16528 + [1678876803.495040][714337:714339] CHIP:-: ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1727: CHIP Error 0x000000C9: No shared trusted root at ../../commands/clusters/ModelCommand.cpp:62 - ./chip-tool basicinformation read node-label 2 0 --commissioner-name beta + ./chip-tool basicinformation read node-label 1 0 --commissioner-name beta - [1663571960.877702][3488:3488] CHIP:DL: NVS set: chip-counters/total-operational-hours = 0 (0x0) - [1663571960.877766][3488:3488] CHIP:DL: Inet Layer shutdown - [1663571960.877820][3488:3488] CHIP:DL: BLE shutdown - [1663571960.877873][3488:3488] CHIP:DL: System Layer shutdown - [1663571960.878116][3488:3488] CHIP:TOO: Run command failure: ../../src/lib/address_resolve/AddressResolve_DefaultImpl.cpp:174: CHIP Error 0x00000032: Timeout + [1678876803.495007][714337:714339] CHIP:SC: Received error (protocol code 1) during pairing process: ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1727: CHIP Error 0x000000C9: No shared trusted root + [1678876803.495018][714337:714339] CHIP:IN: SecureSession[0x7f2764026220]: Released - Type:2 LSID:16528 + [1678876803.495040][714337:714339] CHIP:-: ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1727: CHIP Error 0x000000C9: No shared trusted root at ../../commands/clusters/ModelCommand.cpp:62 disabled: true - label: @@ -361,7 +357,7 @@ tests: verification: | On any Linux platform execute this command or in TH_CR2 - grl@grl-ThinkPad-L480:~/may16_cntrl03/connectedhomeip/examples/chip-tool/out/debug$ avahi-browse -rt _matter._tcp + avahi-browse -rt _matter._tcp + wlp5s0 IPv6 8E50A59FAF52A809-0000000000000001 _matter._tcp local diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_18.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_18.yaml index 11d26f817d985b..f74d1809c67a94 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_18.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_18.yaml @@ -250,19 +250,15 @@ tests: ./chip-tool basicinformation write node-label te5new 2 0 --commissioner-name beta - [1663571657.500021][3463:3463] CHIP:DL: NVS set: chip-counters/total-operational-hours = 0 (0x0) - [1663571657.500077][3463:3463] CHIP:DL: Inet Layer shutdown - [1663571657.500123][3463:3463] CHIP:DL: BLE shutdown - [1663571657.500168][3463:3463] CHIP:DL: System Layer shutdown - [1663571657.500383][3463:3463] CHIP:TOO: Run command failure: ../../examples/chip-tool/commands/common/CHIPCommand.cpp:454: CHIP Error 0x00000032: Timeout + [1678876803.495007][714337:714339] CHIP:SC: Received error (protocol code 1) during pairing process: ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1727: CHIP Error 0x000000C9: No shared trusted root + [1678876803.495018][714337:714339] CHIP:IN: SecureSession[0x7f2764026220]: Released - Type:2 LSID:16528 + [1678876803.495040][714337:714339] CHIP:-: ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1727: CHIP Error 0x000000C9: No shared trusted root at ../../commands/clusters/ModelCommand.cpp:62 ./chip-tool basicinformation read node-label 2 0 --commissioner-name beta - [1663571960.877702][3488:3488] CHIP:DL: NVS set: chip-counters/total-operational-hours = 0 (0x0) - [1663571960.877766][3488:3488] CHIP:DL: Inet Layer shutdown - [1663571960.877820][3488:3488] CHIP:DL: BLE shutdown - [1663571960.877873][3488:3488] CHIP:DL: System Layer shutdown - [1663571960.878116][3488:3488] CHIP:TOO: Run command failure: ../../src/lib/address_resolve/AddressResolve_DefaultImpl.cpp:174: CHIP Error 0x00000032: Timeout + [1678876803.495007][714337:714339] CHIP:SC: Received error (protocol code 1) during pairing process: ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1727: CHIP Error 0x000000C9: No shared trusted root + [1678876803.495018][714337:714339] CHIP:IN: SecureSession[0x7f2764026220]: Released - Type:2 LSID:16528 + [1678876803.495040][714337:714339] CHIP:-: ../../third_party/connectedhomeip/src/protocols/secure_channel/CASESession.cpp:1727: CHIP Error 0x000000C9: No shared trusted root at ../../commands/clusters/ModelCommand.cpp:62 disabled: true - label: "DUT_CR1 sends command to TH_CE to read the list of Fabrics" @@ -344,7 +340,7 @@ tests: Execute the below avahi-browse command in any LInux machine or in TH_CR2. - grl@grl-ThinkPad-L480:~/may16_cntrl03/connectedhomeip/examples/chip-tool/out/debug$ avahi-browse -rt _matter._tcp + avahi-browse -rt _matter._tcp + wlp5s0 IPv6 8E50A59FAF52A809-0000000000000001 _matter._tcp local + wlp5s0 IPv6 03E707466A904C7E-0000000000000003 _matter._tcp local = wlp5s0 IPv6 8E50A59FAF52A809-0000000000000001 _matter._tcp local diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_2.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_2.yaml index 1bc6802514368a..cfa7d368e34196 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_2.yaml @@ -128,7 +128,7 @@ tests: On TH_CR1 send the below command - ubuntu@ubuntu:~/may10_cntrl2/connectedhomeip/examples/chip-tool/out/debug$ avahi-browse -rt _matter._tcp + $ avahi-browse -rt _matter._tcp If the DUT has to provision to verify the logs, verify that TH all-clusters-app is now discoverable over DNS-SD with two SRV Records commissioning’s information. @@ -425,7 +425,7 @@ tests: On TH_CR3 send the below command - ./chip-tool pairing code 3 20202021 --commissioner-name gamma + ./chip-tool pairing onnetwork 3 20202021 --commissioner-name gamma verify you got the following message in the TH_CR3(all-clusters-app) log @@ -544,11 +544,10 @@ tests: On TH_CR1 send the below command - (considering 34995354639 as the manual code generated by DUT) - ./chip-tool pairing code 1 20202021 + ./chip-tool pairing onnetwork 1 20202021 [1676358083.879096][997283:997283] CHIP:SVR: Failsafe timer expired [1676358083.879098][997283:997283] CHIP:IN: SecureSession[0x563d5294d7b0]: MarkForEviction Type:1 LSID:55630 - [1676358083.879100][997283:997283] CHIP:SC: SecureSession[0x563d5294d7b0]: Moving from state "kActive" --> "kPendingEviction" + [1676358083.879100][997283:997283] CHIP:SC: SecureSession[0x563d5294d7b0]: Moving from state 'kActive' --> 'kPendingEviction' [1676358083.879109][997283:997283] CHIP:IN: SecureSession[0x563d5294d7b0]: Released - Type:1 LSID:55630 [1676358083.879113][997283:997283] CHIP:SVR: Commissioning failed (attempt 1): ../../third_party/connectedhomeip/src/app/server/CommissioningWindowManager.cpp:77: CHIP Error 0x00000032: Timeout [1676358083.879123][997283:997283] CHIP:IN: SecureSession[0x563d5294d7b0]: Allocated Type:1 LSID:55631 @@ -562,10 +561,10 @@ tests: If the DUT has to provision to verify the logs, Verify the OperationalCert error 9 in TH_CE(all-clusters-app) Log [1676358083.879250][998226:998228] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_0030 Command=0x0000_0001 [1676358083.879258][998226:998228] CHIP:CTL: Failsafe disarmed - [1676358083.879264][998226:998228] CHIP:CTL: Successfully finished commissioning step "Cleanup" - [1676358083.879274][998226:998228] CHIP:TOO: Device commissioning Failure: ../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1365: CHIP Error 0x0000007E: Trying to add a NOC for a fabric that already exists + [1676358083.879264][998226:998228] CHIP:CTL: Successfully finished commissioning step 'Cleanup' + [1676358083.879274][998226:998228] CHIP:TOO: Device commissioning Failure: ../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1365: CHIP Error 0x0000007E: Trying to add a NOC for a fabric that already exists) with OperationalCert error 9 [1676358083.879284][998226:998228] CHIP:IN: SecureSession[0x7fe26000eec0]: MarkForEviction Type:1 LSID:21508 - [1676358083.879287][998226:998228] CHIP:SC: SecureSession[0x7fe26000eec0]: Moving from state "kActive" --> "kPendingEviction" + [1676358083.879287][998226:998228] CHIP:SC: SecureSession[0x7fe26000eec0]: Moving from state 'kActive' --> 'kPendingEviction' [1676358083.879312][998226:998228] CHIP:EM: Failed to send Solitary ack for MessageCounter:80598822 on exchange 54053i:../../third_party/connectedhomeip/src/messaging/ExchangeContext.cpp:144: CHIP Error 0x00000002: Connection aborted [1676358083.879325][998226:998228] CHIP:DMG: ICR moving to [AwaitingDe] disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_22.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_22.yaml index ccbbdeef521f19..77d87467e0cef1 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_22.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_22.yaml @@ -59,10 +59,43 @@ tests: - name: "nodeId" value: nodeId - - label: "TH_CR1 opens a commissioning window on DUT_CE" + - label: + "TH_CR1 opens a commissioning window on DUT_CE using ECM with a value + of 900 seconds" + verification: | + On TH_CR1 - (chip tool), open commissioning window + + ./chip-tool pairing open-commissioning-window 1 1 900 1000 3840 + + Verify Manual pairing code on TH_CR1(chip-tool) Log + + [1635925713.966786][9695:9700] CHIP:SC: Success status report received. Session was established + [1635925713.966839][9695:9700] CHIP:IN: New secure session created for device 0x0000000000000001, key 33!! + [1635925713.966938][9695:9700] CHIP:CTL: OpenCommissioningWindow for device ID 1 + [1635925713.972601][9695:9700] CHIP:DMG: ICR moving to [AddingComm] + [1635925713.972705][9695:9700] CHIP:DMG: ICR moving to [AddedComma] + [1635925713.972815][9695:9700] CHIP:IN: Prepared encrypted message 0xaaaad9b57d10 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 31056i with MessageCounter:0. + [1635925713.972876][9695:9700] CHIP:IN: Sending encrypted msg 0xaaaad9b57d10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 13449459 msec + [1635925713.973006][9695:9700] CHIP:DMG: ICR moving to [CommandSen] + [1635925713.973061][9695:9700] CHIP:CTL: Manual pairing code: [35484132896] + [1635925713.973120][9695:9700] CHIP:CTL: SetupQRCode: [MT:00000CQM00A7F87ZT10] + [1635925713.973178][9695:9700] CHIP:EM: Sending Standalone Ack for MessageCounter:1964916542 on exchange 31055i + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" + + - label: + "TH_CR1 opens a commissioning window on DUT_CE using ECM with a value + of 900 seconds" cluster: "Administrator Commissioning" command: "OpenCommissioningWindow" - PICS: CADMIN.S.C00.Rsp + PICS: CADMIN.S.C00.Rsp && PICS_SDK_CI_ONLY timedInteractionTimeoutMs: 10000 arguments: values: @@ -94,10 +127,36 @@ tests: response: value: 0 - - label: "TH_CR1 opens a commissioning window on DUT_CE" + - label: + "TH_CR1 opens a commissioning window on DUT_CE using ECM with a value + of 901 seconds" + verification: | + On TH_CR1 (chip tool), open commissioning window + + ./chip-tool pairing open-commissioning-window 1 1 901 2000 3841 + + Verify DUT_CE responds General error 0x85 on TH_CR1 (chip-tool) log + + CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x85 + [1652860801.225084][9512:9517] CHIP:TOO: Error: IM Error 0x00000585: General error: 0x85 (INVALID_COMMAND) + [1652860801.225173][9512:9517] CHIP:DMG: ICR moving to [AwaitingDe] + [1652860801.225294][9512:9517] CHIP:EM: Sending Standalone Ack for MessageCounter:4191961 on exchange 37827i + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" + + - label: + "TH_CR1 opens a commissioning window on DUT_CE using ECM with a value + of 901 seconds" cluster: "Administrator Commissioning" command: "OpenCommissioningWindow" - PICS: CADMIN.S.C00.Rsp + PICS: CADMIN.S.C00.Rsp && PICS_SDK_CI_ONLY timedInteractionTimeoutMs: 10000 arguments: values: diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_24.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_24.yaml index 23fc9d415157e2..aff22b70bd36e9 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_24.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_24.yaml @@ -59,10 +59,41 @@ tests: - name: "nodeId" value: nodeId + - label: + "TH_CR1 opens a commissioning window on DUT_CE using ECM with a value + of 180 seconds" + verification: | + On TH_CR1 ( chip tool), open commissioning window + + ./chip-tool pairing open-commissioning-window 1 1 180 1000 3840 + + Verify Manual pairing code on TH_CR1(chip-tool) Log + + [1635925713.966786][9695:9700] CHIP:SC: Success status report received. Session was established + [1635925713.966839][9695:9700] CHIP:IN: New secure session created for device 0x0000000000000001, key 33!! + [1635925713.966938][9695:9700] CHIP:CTL: OpenCommissioningWindow for device ID 1 + [1635925713.972601][9695:9700] CHIP:DMG: ICR moving to [AddingComm] + [1635925713.972705][9695:9700] CHIP:DMG: ICR moving to [AddedComma] + [1635925713.972815][9695:9700] CHIP:IN: Prepared encrypted message 0xaaaad9b57d10 to 0x0000000000000001 of type 0x8 and protocolId (0, 1) on exchange 31056i with MessageCounter:0. + [1635925713.972876][9695:9700] CHIP:IN: Sending encrypted msg 0xaaaad9b57d10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 13449459 msec + [1635925713.973006][9695:9700] CHIP:DMG: ICR moving to [CommandSen] + [1635925713.973061][9695:9700] CHIP:CTL: Manual pairing code: [35484132896] + [1635925713.973120][9695:9700] CHIP:CTL: SetupQRCode: [MT:00000CQM00A7F87ZT10] + [1635925713.973178][9695:9700] CHIP:EM: Sending Standalone Ack for MessageCounter:1964916542 on exchange 31055i + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" + - label: "TH_CR1 opens a commissioning window on DUT_CE" cluster: "Administrator Commissioning" command: "OpenCommissioningWindow" - PICS: CADMIN.S.C00.Rsp + PICS: CADMIN.S.C00.Rsp && PICS_SDK_CI_ONLY timedInteractionTimeoutMs: 10000 arguments: values: @@ -94,10 +125,34 @@ tests: response: value: 0 + - label: + "TH_CR1 opens a commissioning window on DUT_CE using ECM with a value + of 179 seconds" + verification: | + On TH_CR1 ( chip tool), open commissioning window + + ./chip-tool pairing open-commissioning-window 1 1 179 2000 3841 + + Verify DUT_CE responds General error 0x85 on TH_CR1 (chip-tool) log + + CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0001 Status=0x85 + [1652860801.225084][9512:9517] CHIP:TOO: Error: IM Error 0x00000585: General error: 0x85 (INVALID_COMMAND) + [1652860801.225173][9512:9517] CHIP:DMG: ICR moving to [AwaitingDe] + [1652860801.225294][9512:9517] CHIP:EM: Sending Standalone Ack for MessageCounter:4191961 on exchange 37827i + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" + - label: "TH_CR1 opens a commissioning window on DUT_CE" cluster: "Administrator Commissioning" command: "OpenCommissioningWindow" - PICS: CADMIN.S.C00.Rsp + PICS: CADMIN.S.C00.Rsp && PICS_SDK_CI_ONLY timedInteractionTimeoutMs: 10000 arguments: values: diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_3.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_3.yaml index 719702fe3308fd..bf4220bd0a9348 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_3.yaml @@ -11,6 +11,7 @@ # 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: 24.1.3. [TC-CADMIN-1.3] Node Behavior using ECM [DUT - Commissionee] @@ -19,147 +20,105 @@ PICS: config: nodeId: 0x12344321 - timeout: 300 - nodeId2: - type: node_id - defaultValue: 0xCAFE + cluster: "Basic Information" endpoint: 0 - discriminator: - type: int16u - defaultValue: 3840 - payload: - type: char_string - defaultValue: "MT:-24J0AFN00KA0648G00" # This value needs to be generated automatically - PakeVerifier: - type: octet_string - defaultValue: "hex:b96170aae803346884724fe9a3b287c30330c2a660375d17bb205a8cf1aecb350457f8ab79ee253ab6a8e46bb09e543ae422736de501e3db37d441fe344920d09548e4c18240630c4ff4913c53513839b7c07fcc0627a1b8573a149fcd1fa466cf" - waitAfterCommissioning: - type: int16u - defaultValue: 5000 tests: - - label: "Precondition: Reset Devices to factory defaults" - PICS: PICS_SDK_CI_ONLY - cluster: "SystemCommands" - command: "FactoryReset" - - - label: "Precondition: Reset Devices to factory defaults" + - label: "Precondition" verification: | Reset Devices to factory defaults - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Factory Reset the DUT and enter 'y' after success" - - name: "expectedValue" - value: "y" + disabled: true - label: "TH_CR1 starts a commissioning process with DUT_CE" - cluster: "DelayCommands" - command: "WaitForCommissionee" PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "TH_CR1 opens a commissioning window on DUT_CE" - cluster: "Administrator Commissioning" - command: "OpenCommissioningWindow" + verification: | + "1. Provision the DUT_CE (all-cluster-app) device using TH_CR1 (chip-tool ) on the raspi" + disabled: true + + - label: + "TH_CR1 opens a commissioning window on DUT_CE using a commissioning + timeout of PIXIT.CADMIN.CwDuration seconds using ECM" PICS: CADMIN.S.C00.Rsp - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "CommissioningTimeout" - value: 180 - - name: "PAKEPasscodeVerifier" - value: PakeVerifier - - name: "Discriminator" - value: discriminator - - name: "Iterations" - value: 1000 - - name: "Salt" - value: "SPAKE2P Key Salt" - - - label: "Waiting after opening commissioning window" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: waitAfterCommissioning - - #Check for DNS-SD advertisement CM is not possible in YAML + verification: | + On TH_CR1 send the below command + + ./chip-tool pairing open-commissioning-window 1 1 400 2000 3841 + + Verify the Open commisioning window on the DUT_CE(all-cluster-app) Log: + + [1660904553.796857][3537:3537] CHIP:DMG: Received command for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 + [1660904553.796951][3537:3537] CHIP:ZCL: Received command to open commissioning window + [1660904553.797255][3537:3537] CHIP:IN: SecureSession[0xaaab142ef7f0]: Allocated Type:1 LSID:34523 + + Verify the Manual pairing code on the TH_CR1(chip-tool) Log: + + [1635864513.699433][3850:3855] CHIP:DMG: ICR moving to [CommandSen] + [1635864513.699489][3850:3855] CHIP:CTL: Manual pairing code: [36177160937] + [1635864513.699566][3850:3855] CHIP:CTL: SetupQRCode: [MT:00000CQM00YZN476420] + [1635864513.699636][3850:3855] CHIP:EM: Sending Standalone Ack for MessageCounter:2599714227 on exchange 60688i + [1635864513.699685][3850:3855] CHIP:IN: Prepared plaintext message 0xffff8a7cd960 to 0x0000000000000000 of type 0x10 and . + disabled: true + - label: "Verify that the DNS-SD advertisement shows CM=2" verification: | On TH_CR1 send the below command avahi-browse -rt _matterc._udp + On TH_CR1(chip-tool) Verify that the DNS-SD advertisement shows CM=2 + + eth0 IPv6 4D0262FE51384D5A _matterc._udp local = eth0 IPv6 4D0262FE51384D5A _matterc._udp local - hostname = [E45F010F27530000.local] - address = [fe80::e65f:1ff:fe0f:2753] - port = [5540] - txt = ["PI=" "PH=36" "CM=2" "D=3840" "T=1" "SAI=300" "SII=5000" "VP=65521+32769"] - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "enter 'y' after success" - - name: "expectedValue" - value: "y" + hostname = [E45F010F27530000.local] + address = [fe80::e65f:1ff:fe0f:2753] + port = [5540] + txt = ["PI=" "PH=36" "CM=2" "D=3840" "T=1" "SAI=300" "SII=5000" "VP=65521+32769"] + disabled: true - label: - "TH_CR1 writes the Basic Information Clusters NodeLabel mandatory - attribute of DUT_CE" - command: "writeAttribute" + "TH_CR1 writes and reads the Basic Information Clusters NodeLabel + mandatory attribute of DUT_CE" PICS: BINFO.S.A0005 - cluster: "Basic Information" - attribute: "NodeLabel" - arguments: - value: "chiptest" + verification: | + On TH_CR1 send the below command - - label: - "TH_CR1 reads the Basic Information Clusters NodeLabel mandatory - attribute of DUT_CE" - command: "readAttribute" - PICS: BINFO.S.A0005 - cluster: "Basic Information" - attribute: "NodeLabel" - response: - value: "chiptest" - constraints: - type: char_string - maxLength: 32 + ./chip-tool basicinformation write node-label te9 1 0 + + Verify the success response on the TH_CR1(chip-tool) Log: + + + [1649245940.789388][10110:10115] CHIP:DMG: + [1649245940.789454][10110:10115] CHIP:DMG: StatusIB = + [1649245940.789519][10110:10115] CHIP:DMG: { + [1649245940.789588][10110:10115] CHIP:DMG: status = 0x00 (SUCCESS), + [1649245940.789654][10110:10115] CHIP:DMG: }, + [1649245940.789719][10110:10115] CHIP:DMG: + [1649245940.789778][10110:10115] CHIP:DMG: }, + [1649245940.789841][10110:10115] CHIP:DMG: + + ./chip-tool basicinformation read node-label 1 0 + + Verify the Nodelabel response on the TH_CR1(chip-tool) Log: + + + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3061847068 + [1649245950.006849][10116:10121] CHIP:TOO: NodeLabel: te9 + [1649245950.007024][10116:10121] CHIP:EM: Sending Standalone Ack for MessageCounter:12495101 on exchange 24816i + disabled: true - label: "TH_CR2 starts a commissioning process with DUT_CE" - identity: "beta" PICS: CADMIN.S - cluster: "CommissionerCommands" - command: "PairWithCode" - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: payload - - - label: "DUT_CE is commissioned by TH_CR2 on Fabric ID2" - PICS: CADMIN.S - identity: "beta" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId2 - - #Check for DNS-SD advertisement is not possible in YAML + verification: | + On TH_CR2 send the below command + + Below is the example when using chip tool as controller (considering 36177160937 as the manual code generated by 1st controller) + + ./chip-tool pairing code 2 36177160937 --commissioner-name beta + Verify the below message in the TH_CR2(chip-tool) Log: + + Device commissioning completed with success + disabled: true + - label: "Verify DUT_CE is now discoverable over DNS-SD with two SRV Records" verification: | @@ -167,176 +126,229 @@ tests: Verify if the DUT_CE is broadcasting using - ubuntu@ubuntu:~/may16_cntrl/connectedhomeip/examples/chip-tool/out/debug$ avahi-browse -rt _matter._tcp + avahi-browse -rt _matter._tcp + + On TH_CR2(chip-tool) Verify DUT_CE is now discoverable over DNS-SD with two SRV Records + + eth0 IPv6 9B9C01C971F4119F-0000000000000001 _matter._tcp local + eth0 IPv6 C8A60CCA27F33379-0000000000000002 _matter._tcp local = eth0 IPv6 9B9C01C971F4119F-0000000000000001 _matter._tcp local - hostname = [E45F010F27530000.local] - address = [fe80::e65f:1ff:fe0f:2753] - port = [5540] - txt = ["T=1" "SAI=300" "SII=5000"] + hostname = [E45F010F27530000.local] + address = [fe80::e65f:1ff:fe0f:2753] + port = [5540] + txt = ["T=1" "SAI=300" "SII=5000"] = eth0 IPv6 C8A60CCA27F33379-0000000000000002 _matter._tcp local - hostname = [E45F010F27530000.local] - address = [fe80::e65f:1ff:fe0f:2753] - port = [5540] - txt = ["T=1" "SAI=300" "SII=5000"] + hostname = [E45F010F27530000.local] + address = [fe80::e65f:1ff:fe0f:2753] + port = [5540] + txt = ["T=1" "SAI=300" "SII=5000"] ubuntu@ubuntu:~/may16_cntrl/connectedhomeip/examples/chip-tool/out/debug$ - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "enter 'y' after success" - - name: "expectedValue" - value: "y" + disabled: true - label: "TH_CR1 reads the list of Fabrics on DUT_CE" - command: "readAttribute" - cluster: "Operational Credentials" - attribute: "Fabrics" PICS: OPCREDS.S.A0001 - fabricFiltered: false - response: - value: [{ Label: "", NodeID: nodeId }, { Label: "", NodeID: nodeId2 }] - constraints: - type: list + verification: | + On TH_CR1 send the below command + + ./chip-tool operationalcredentials read fabrics 1 0 --fabric-filtered 0 + + Verify the entiries on the TH_CR1(chip-tool) Log: + + + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 3621507063 + [1649245825.315152][10098:10103] CHIP:TOO: Fabrics: 2 entries + [1649245825.315316][10098:10103] CHIP:TOO: [1]: { + [1649245825.315370][10098:10103] CHIP:TOO: RootPublicKey: 045541017FCEFD0D83963C9ED7F21380C6B789EB989B5D20DC318FAE92D60D0F685666505E9C4F86C49ADC71AB3A8B9B44FD43214CF9BE2B6D47DE01F28FE1544F + [1649245825.315436][10098:10103] CHIP:TOO: VendorId: 65521 + [1649245825.315479][10098:10103] CHIP:TOO: FabricId: 1 + [1649245825.315518][10098:10103] CHIP:TOO: NodeId: 1 + [1649245825.315557][10098:10103] CHIP:TOO: Label: + [1649245825.315596][10098:10103] CHIP:TOO: FabricIndex: 1 + [1649245825.315637][10098:10103] CHIP:TOO: } + [1649245825.315697][10098:10103] CHIP:TOO: [2]: { + [1649245825.315747][10098:10103] CHIP:TOO: RootPublicKey: 047D75BF7D91FCFFB29DAD375D09790FEBE9205227C44D4FF8EB70ADAD02E416E08269B9F77E86FE14270525B64C41417CEA3E9FDE0552AE8DF05F8D98B6B6E2E2 + [1649245825.315789][10098:10103] CHIP:TOO: VendorId: 65521 + [1649245825.315830][10098:10103] CHIP:TOO: FabricId: 1 + [1649245825.315870][10098:10103] CHIP:TOO: NodeId: 2 + [1649245825.315908][10098:10103] CHIP:TOO: Label: + [1649245825.315947][10098:10103] CHIP:TOO: FabricIndex: 2 + [1649245825.315986][10098:10103] CHIP:TOO: } + disabled: true - label: "TH_CR2 reads the list of Fabrics on DUT_CE" - identity: "beta" - command: "readAttribute" - cluster: "Operational Credentials" - attribute: "Fabrics" PICS: OPCREDS.S.A0001 - fabricFiltered: false - response: - value: [{ Label: "", NodeID: nodeId }, { Label: "", NodeID: nodeId2 }] - constraints: - type: list + verification: | + On TH_CR2 send the below command - - label: - "TH_CR1 writes the Basic Information Clusters NodeLabel mandatory - attribute of DUT_CE" - command: "writeAttribute" - cluster: "Basic Information" - PICS: BINFO.S.A0005 - attribute: "NodeLabel" - arguments: - value: "chiptest1" + ./chip-tool operationalcredentials read fabrics 2 0 --fabric-filtered 0 --commissioner-name beta - - label: - "TH_CR1 reads the Basic Information Clusters NodeLabel mandatory - attribute of DUT_CE" - command: "readAttribute" - cluster: "Basic Information" - PICS: BINFO.S.A0005 - attribute: "NodeLabel" - response: - value: "chiptest1" - constraints: - type: char_string - maxLength: 32 + Verify the entiries on the TH_CR2(chip-tool) Log: + + + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0001 DataVersion: 3621507063 + [1649245825.315152][10098:10103] CHIP:TOO: Fabrics: 2 entries + [1649245825.315316][10098:10103] CHIP:TOO: [1]: { + [1649245825.315370][10098:10103] CHIP:TOO: RootPublicKey: 045541017FCEFD0D83963C9ED7F21380C6B789EB989B5D20DC318FAE92D60D0F685666505E9C4F86C49ADC71AB3A8B9B44FD43214CF9BE2B6D47DE01F28FE1544F + [1649245825.315436][10098:10103] CHIP:TOO: VendorId: 65521 + [1649245825.315479][10098:10103] CHIP:TOO: FabricId: 1 + [1649245825.315518][10098:10103] CHIP:TOO: NodeId: 1 + [1649245825.315557][10098:10103] CHIP:TOO: Label: + [1649245825.315596][10098:10103] CHIP:TOO: FabricIndex: 1 + [1649245825.315637][10098:10103] CHIP:TOO: } + [1649245825.315697][10098:10103] CHIP:TOO: [2]: { + [1649245825.315747][10098:10103] CHIP:TOO: RootPublicKey: 047D75BF7D91FCFFB29DAD375D09790FEBE9205227C44D4FF8EB70ADAD02E416E08269B9F77E86FE14270525B64C41417CEA3E9FDE0552AE8DF05F8D98B6B6E2E2 + [1649245825.315789][10098:10103] CHIP:TOO: VendorId: 65521 + [1649245825.315830][10098:10103] CHIP:TOO: FabricId: 1 + [1649245825.315870][10098:10103] CHIP:TOO: NodeId: 2 + [1649245825.315908][10098:10103] CHIP:TOO: Label: + [1649245825.315947][10098:10103] CHIP:TOO: FabricIndex: 2 + [1649245825.315986][10098:10103] CHIP:TOO: } + disabled: true - label: - "TH_CR2 writes the Basic Information Clusters NodeLabel mandatory - attribute of DUT_CE" - identity: "beta" - command: "writeAttribute" - cluster: "Basic Information" + "TH_CR1 writes and reads the Basic Information Clusters NodeLabel + mandatory attribute of DUT_CE" PICS: BINFO.S.A0005 - attribute: "NodeLabel" - arguments: - value: "chiptest2" + verification: | + On TH_CR1 send the below command + + ./chip-tool basicinformation write node-label te9 1 0 + + Verify the Success response on the TH_CR1(chip-tool) Log: + + [1649245940.789313][10110:10115] CHIP:DMG: } + [1649245940.789388][10110:10115] CHIP:DMG: + [1649245940.789454][10110:10115] CHIP:DMG: StatusIB = + [1649245940.789519][10110:10115] CHIP:DMG: { + [1649245940.789588][10110:10115] CHIP:DMG: status = 0x00 (SUCCESS), + [1649245940.789654][10110:10115] CHIP:DMG: }, + + + Verify read attribute returns the updated value written + + ./chip-tool basicinformation read node-label 1 0 + + Verify the Nodelabel response on the TH_CR1(chip-tool) Log: + + + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3061847068 + [1649245950.006849][10116:10121] CHIP:TOO: NodeLabel: te9 + [1649245950.007024][10116:10121] CHIP:EM: Sending Standalone Ack for MessageCounter:12495101 on exchange 24816i + disabled: true - label: - "TH_CR2 reads the Basic Information Clusters NodeLabel mandatory - attribute of DUT_CE" - identity: "beta" - command: "readAttribute" - cluster: "Basic Information" + "TH_CR2 reads, writes and then reads the Basic Information Clusters + NodeLabel mandatory attribute of DUT_CE" PICS: BINFO.S.A0005 - attribute: "NodeLabel" - response: - value: "chiptest2" - constraints: - type: char_string - maxLength: 32 + verification: | + On TH_CR2 send the below command + + ./chip-tool basicinformation write node-label te9 2 0 --commissioner-name beta + + Verify the Success response on the TH_CR2(chip-tool) Log: + + [1649245940.789388][10110:10115] CHIP:DMG: + [1649245940.789454][10110:10115] CHIP:DMG: StatusIB = + [1649245940.789519][10110:10115] CHIP:DMG: { + [1649245940.789588][10110:10115] CHIP:DMG: status = 0x00 (SUCCESS), + [1649245940.789654][10110:10115] CHIP:DMG: }, + + Verify read attribute returns the updated value written + + ./chip-tool basicinformation read node-label 2 0 --commissioner-name beta + + Verify the Nodelabel response on the TH_CR1(chip-tool) Log: + + + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3061847068 + [1649245950.006849][10116:10121] CHIP:TOO: NodeLabel: te9 + [1649245950.007024][10116:10121] CHIP:EM: Sending Standalone Ack for MessageCounter:12495101 on exchange 24816i + disabled: true - label: "TH_CR2 opens a commissioning window on DUT_CE using ECM" - cluster: "Administrator Commissioning" - command: "OpenCommissioningWindow" PICS: CADMIN.S.C00.Rsp - identity: "beta" - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "CommissioningTimeout" - value: 180 - - name: "PAKEPasscodeVerifier" - value: PakeVerifier - - name: "Discriminator" - value: discriminator - - name: "Iterations" - value: 1000 - - name: "Salt" - value: "SPAKE2P Key Salt" + verification: | + On TH_CR2 send the below command + + ./chip-tool pairing open-commissioning-window 2 1 200 1000 3840 --commissioner-name beta + + Verify the Open commisioning window on the DUT_CE(all-cluster-app) Log: + + [1660904553.796857][3537:3537] CHIP:DMG: Received command for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 + [1660904553.796951][3537:3537] CHIP:ZCL: Received command to open commissioning window + [1660904553.797255][3537:3537] CHIP:IN: SecureSession[0xaaab142ef7f0]: Allocated Type:1 LSID:34523 + + Verify the Manual pairing code on the TH_CR1(chip-tool) Log: + + [1635864513.699433][3850:3855] CHIP:DMG: ICR moving to [CommandSen] + [1635864513.699489][3850:3855] CHIP:CTL: Manual pairing code: [36177160937] + [1635864513.699566][3850:3855] CHIP:CTL: SetupQRCode: [MT:00000CQM00YZN476420] + disabled: true - label: "Wait for the commissioning window in step 13 to timeout" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 180000 + verification: | + Wait for the timeout of the above step + disabled: true - label: "TH_CR2 reads the window status to verify the DUT_CE window is closed" - cluster: "Administrator Commissioning" PICS: CADMIN.S.A0000 - command: "readAttribute" - attribute: "WindowStatus" - response: - value: 0 + verification: | + On TH_CR2 send the below command + + Below command is an example using chip tool + ./chip-tool administratorcommissioning read window-status 2 0 --commissioner-name beta + + Verify the WindowStatus on the TH_CR2(chip-tool) Log: + + + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003C Attribute 0x0000_0000 DataVersion: 2849200592 + [1651137648.760469][14047:14052] CHIP:TOO: WindowStatus: 0 + [1651137648.760534][14047:14052] CHIP:EM: Sending Standalone Ack for MessageCounter:5527412 on exchange 14590i + disabled: true - label: "TH_CR2 opens a commissioning window on DUT_CE using ECM" - cluster: "Administrator Commissioning" - command: "OpenCommissioningWindow" PICS: CADMIN.S.C00.Rsp - identity: "beta" - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "CommissioningTimeout" - value: 180 - - name: "PAKEPasscodeVerifier" - value: PakeVerifier - - name: "Discriminator" - value: discriminator - - name: "Iterations" - value: 1000 - - name: "Salt" - value: "SPAKE2P Key Salt" - - - label: "Waiting after opening commissioning window" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: waitAfterCommissioning + verification: | + On TH_CR2 send the below command + + ./chip-tool pairing open-commissioning-window 2 1 200 1000 3840 --commissioner-name beta + + Verify the Open commisioning window on the DUT_CE(all-cluster-app) Log: + + [1660904553.796857][3537:3537] CHIP:DMG: Received command for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 + [1660904553.796951][3537:3537] CHIP:ZCL: Received command to open commissioning window + [1660904553.797255][3537:3537] CHIP:IN: SecureSession[0xaaab142ef7f0]: Allocated Type:1 LSID:34523 + + Verify the Manual pairing code on the TH_CR1(chip-tool) Log: + + [1635864513.699433][3850:3855] CHIP:DMG: ICR moving to [CommandSen] + [1635864513.699489][3850:3855] CHIP:CTL: Manual pairing code: [36177160937] + [1635864513.699566][3850:3855] CHIP:CTL: SetupQRCode: [MT:00000CQM00YZN476420] + [1635864513.699636][3850:3855] CHIP:EM: Sending Standalone Ack for MessageCounter:2599714227 on exchange 60688i + disabled: true - label: "TH_CR1 starts a commissioning process with DUT_CE before the timeout from step 12" - cluster: "CommissionerCommands" - command: "PairWithCode" PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId - - name: "payload" - value: payload - response: - error: FAILURE - clusterError: 9 + verification: | + On TH_CR1 send the below command + + Below is the example when using chip tool as controller (considering 36177160937 as the manual code generated by 1st controller) + ./chip-tool pairing code 1 36177160937 + + Verify the OperationalCert error 9 in DUT_CE(all-clusters-app) Log + + [1660902716.613196][3045:3045] CHIP:DMG: Command handler moving to [AddedComma] + [1660902716.613274][3045:3045] CHIP:ZCL: OpCreds: Failed AddNOC request (err=../../examples/all-clusters-app/linux/third_party/connectedhomeip/src/credentials/FabricTable.cpp:1692: CHIP Error 0x0000007E: Trying to add a NOC for a fabric that already exists) with OperationalCert error 9 + [1660902716.613394][3045:3045] CHIP:DMG: Decreasing reference count for CommandHandler, remaining 0 + [1660902716.613497][3045:3045] CHIP:EM: Piggybacking Ack for MessageCounter:176866087 on exchange: 56605r + + Trying to add a NOC for a fabric that already exists On TH_CR1(chip-tool) Log + + [1651786200275] [36301:315544] CHIP: [DMG] Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 + [1651786200275] [36301:315544] CHIP: [CTL] Device returned status 9 on receiving the NOC + [1651786200275] [36301:315544] CHIP: [CTL] Add NOC failed with error ../../src/controller/CHIPDeviceController.cpp:1187: CHIP Error 0x0000007E: Trying to add a NOC for a fabric that already exists + [1651786200275] [36301:315544] CHIP: [CTL] Error on commissioning step 'SendNOC': '../../src/controller/CHIPDeviceController.cpp:1187: CHIP Error 0x0000007E: Trying to add a NOC for a fabric that already exists' + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_4.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_4.yaml index 575738c81b8932..cbcb12c5fec8c1 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_4.yaml @@ -63,6 +63,14 @@ tests: - name: "nodeId" value: nodeId + - label: + "TH1 reads CurrentFabricIndex attribute and save it for future use." + command: "readAttribute" + cluster: "Operational Credentials" + attribute: "CurrentFabricIndex" + response: + saveAs: TH1FabricIndex + - label: "TH_CR1 opens a commissioning window on DUT_CE using BCM" cluster: "Administrator Commissioning" command: "OpenBasicCommissioningWindow" @@ -86,7 +94,7 @@ tests: verification: | On TH_CR1 send the below command - ubuntu@ubuntu:~/may16_cntrl/connectedhomeip/examples/chip-tool/out/debug$ avahi-browse -rt _matterc._udp + avahi-browse -rt _matterc._udp + eth0 IPv6 B2822245F1F43570 _matterc._udp local = eth0 IPv6 B2822245F1F43570 _matterc._udp local hostname = [E45F010F27530000.local] @@ -147,6 +155,15 @@ tests: - name: "nodeId" value: nodeId2 + - label: + "TH2 reads CurrentFabricIndex attribute and save it for future use." + identity: "beta" + command: "readAttribute" + cluster: "Operational Credentials" + attribute: "CurrentFabricIndex" + response: + saveAs: TH2FabricIndex + #Check for DNS-SD advertisement is not possible in YAML - label: "Verify DUT_CE is now discoverable over DNS-SD with two SRV Records" @@ -155,7 +172,7 @@ tests: Verify if the DUT_CE is broadcasting using - ubuntu@ubuntu:~/may16_cntrl2/connectedhomeip/examples/chip-tool/out/debug$ avahi-browse -rt _matter._tcp + avahi-browse -rt _matter._tcp + eth0 IPv6 C8A60CCA27F33379-0000000000000002 _matter._tcp local + eth0 IPv6 3C26C93CF201458F-0000000000000001 _matter._tcp local = eth0 IPv6 C8A60CCA27F33379-0000000000000002 _matter._tcp local @@ -185,7 +202,11 @@ tests: attribute: "Fabrics" fabricFiltered: false response: - value: [{ Label: "", NodeID: nodeId }, { Label: "", NodeID: nodeId2 }] + value: + [ + { Label: "", FabricIndex: TH1FabricIndex, NodeID: nodeId }, + { Label: "", FabricIndex: TH2FabricIndex, NodeID: nodeId2 }, + ] constraints: type: list @@ -197,7 +218,11 @@ tests: PICS: OPCREDS.S.A0001 fabricFiltered: false response: - value: [{ Label: "", NodeID: nodeId }, { Label: "", NodeID: nodeId2 }] + value: + [ + { Label: "", FabricIndex: TH1FabricIndex, NodeID: nodeId }, + { Label: "", FabricIndex: TH2FabricIndex, NodeID: nodeId2 }, + ] constraints: type: list @@ -311,3 +336,21 @@ tests: response: error: FAILURE clusterError: 9 + + - label: "TH_CR2 revokes the commissioning window" + identity: "beta" + cluster: "Administrator Commissioning" + command: "RevokeCommissioning" + PICS: CADMIN.S.C02.Rsp && CADMIN.S.C01.Rsp + timedInteractionTimeoutMs: 10000 + + - label: "Remove TH2 FabricIndex" + PICS: OPCREDS.S.C0a.Rsp && CADMIN.S + identity: "beta" + cluster: "Operational Credentials" + command: "RemoveFabric" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "FabricIndex" + value: TH2FabricIndex diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_5.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_5.yaml index 05ed69c10fdcb3..4f582b7aa30d9a 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_5.yaml @@ -11,316 +11,342 @@ # 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: 24.1.5. [TC-CADMIN-1.5] Commissioning window handling timeout and revocation - using ECM [DUT_CE - Commissionee] + using ECM [DUT - Commissionee] PICS: - CADMIN.S config: nodeId: 0x12344321 - timeout: 300 - nodeIdForDuplicateCommissioning: - type: node_id - defaultValue: 0x11 - nodeId2: - type: node_id - defaultValue: 0xCAFE - nodeId3: - type: node_id - defaultValue: 0xC00FEE + cluster: "Basic Information" endpoint: 0 - waitAfterCommissioning: - type: int16u - defaultValue: 5000 - discriminator: - type: int16u - defaultValue: 3840 - payload: - type: char_string - defaultValue: "MT:-24J0AFN00KA0648G00" # This value needs to be generated automatically - PakeVerifier: - type: octet_string - defaultValue: "hex:b96170aae803346884724fe9a3b287c30330c2a660375d17bb205a8cf1aecb350457f8ab79ee253ab6a8e46bb09e543ae422736de501e3db37d441fe344920d09548e4c18240630c4ff4913c53513839b7c07fcc0627a1b8573a149fcd1fa466cf" - IncorrectPakeVerifier: - type: octet_string - defaultValue: "hex:06c756dffcd722653452a12dcd945d8c54da2b0f3cbd1b4dc3f1adb223aeb26b047cd24c96866f979b1d83ec50e2b4ae30cdf2fdb32bd8a211b837dc94edcd56f4d14377191076bfc59d99b7dd3053efd6f02c4434f2bdd27a" tests: - - label: "Precondition: Reset Devices to factory defaults" - PICS: PICS_SDK_CI_ONLY - cluster: "SystemCommands" - command: "FactoryReset" - - - label: "Precondition: Reset Devices to factory defaults" + - label: "Precondition" verification: | Reset Devices to factory defaults - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Factory Reset the DUT and enter 'y' after success" - - name: "expectedValue" - value: "y" + disabled: true - label: "TH_CR1 starts a commissioning process with DUT_CE" - cluster: "DelayCommands" - command: "WaitForCommissionee" PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: "TH_CR1 opens a new commissioning window on DUT_CE using ECM" - cluster: "Administrator Commissioning" - command: "OpenCommissioningWindow" + verification: | + "1. Provision the DUT_CE (all-cluster-app) device using TH_CR1 (chip-tool ) on the raspi" + disabled: true + + - label: + "TH_CR1 opens a commissioning window on DUT_CE using a commissioning + timeout of PIXIT.CADMIN.CwDuration seconds using ECM" PICS: CADMIN.S.C00.Rsp - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "CommissioningTimeout" - value: 180 - - name: "PAKEPasscodeVerifier" - value: PakeVerifier - - name: "Discriminator" - value: discriminator - - name: "Iterations" - value: 1000 - - name: "Salt" - value: "SPAKE2P Key Salt" - - #Check for DNS-SD advertisement CM is not possible in YAML - - label: "Verify that the DNS-SD advertisement shows CM=2" verification: | On TH_CR1 send the below command - ubuntu@ubuntu:~/may16_cntrl/connectedhomeip/examples/chip-tool/out/debug$ avahi-browse -rt _matterc._udp + ./chip-tool pairing open-commissioning-window 1 1 200 1000 3841 + + Verify the Open commisioning window on the DUT_CE(all-cluster-app) Log: + + [1660904553.796857][3537:3537] CHIP:DMG: Received command for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 + [1660904553.796951][3537:3537] CHIP:ZCL: Received command to open commissioning window + [1660904553.797255][3537:3537] CHIP:IN: SecureSession[0xaaab142ef7f0]: Allocated Type:1 LSID:34523 + + Verify the Manual pairing code on the TH_CR1(chip-tool) Log: + + [1635864513.699433][3850:3855] CHIP:DMG: ICR moving to [CommandSen] + [1635864513.699489][3850:3855] CHIP:CTL: Manual pairing code: [36177160937] + [1635864513.699566][3850:3855] CHIP:CTL: SetupQRCode: [MT:00000CQM00YZN476420] + [1635864513.699636][3850:3855] CHIP:EM: Sending Standalone Ack for MessageCounter:2599714227 on exchange 60688i + [1635864513.699685][3850:3855] CHIP:IN: Prepared plaintext message 0xffff8a7cd960 to 0x0000000000000000 of type + disabled: true + + - label: "DNS-SD records shows DUT_CE advertising" + verification: | + On TH_CR1 send the below command + + avahi-browse -rt _matterc._udp + eth0 IPv6 B755245DE9E5E186 _matterc._udp local = eth0 IPv6 B755245DE9E5E186 _matterc._udp local - hostname = [E45F010F27530000.local] - address = [fe80::e65f:1ff:fe0f:2753] - port = [5540] - txt = ["PI=" "PH=36" "CM=2" "D=3840" "T=1" "SAI=300" "SII=5000" "VP=65521+32769"] - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: "Wait for PIXIT.CADMIN.CwDuration + 10 seconds" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: 190000 + hostname = [E45F010F27530000.local] + address = [fe80::e65f:1ff:fe0f:2753] + port = [5540] + txt = ["PI=" "PH=36" "CM=2" "D=3840" "T=1" "SAI=300" "SII=5000" "VP=65521+32769"] + disabled: true - - label: "TH_CR2 starts a commissioning process with DUT_CE" - identity: "beta" - cluster: "CommissionerCommands" + - label: + "TH_CR2 starts a commissioning process with DUT_CE after + PIXIT.CADMIN.CwDuration (that was given in step 2) + 10 seconds" PICS: CADMIN.S.C00.Rsp - command: "PairWithCode" - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: payload - response: - error: FAILURE - - - label: "TH_CR1 opens a new commissioning window on DUT_CE using ECM" - cluster: "Administrator Commissioning" - command: "OpenCommissioningWindow" + verification: | + On TH_CR2 send the below command + + Below is the example when using chip tool as controller (considering 36177160937 as the manual code generated by 1st controller) + + ./chip-tool pairing code 2 36177160937 --commissioner-name beta + + Verify the below message in the TH_CR2(chip-tool) Log: + + [1663841939.843550][13897:13897] CHIP:DL: NVS set: chip-counters/total-operational-hours = 0 (0x0) + [1663841939.843617][13897:13897] CHIP:DL: Inet Layer shutdown + [1663841939.843673][13897:13897] CHIP:DL: BLE shutdown + [1663841939.843727][13897:13897] CHIP:DL: System Layer shutdown + [1663841939.844009][13897:13897] CHIP:TOO: Run command failure: ../../examples/chip-tool/commands/pairing/PairingCommand.cpp:151: CHIP Error 0x00000003: Incorrect state + disabled: true + + - label: + "TH_CR1 opens a new commissioning window on DUT_CE using a + commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" PICS: CADMIN.S.C00.Rsp - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "CommissioningTimeout" - value: 180 - - name: "PAKEPasscodeVerifier" - value: PakeVerifier - - name: "Discriminator" - value: discriminator - - name: "Iterations" - value: 1000 - - name: "Salt" - value: "SPAKE2P Key Salt" - - - label: "Waiting after opening commissioning window" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: waitAfterCommissioning - - - label: "TH_CR1 revokes the commissioning window on DUT_CE" - cluster: "Administrator Commissioning" - command: "RevokeCommissioning" + verification: | + On TH_CR1 send the below command + + ./chip-tool pairing open-commissioning-window 1 1 200 1000 3841 + + Verify the Open commisioning window on the DUT_CE(all-cluster-app) Log: + + [1660904553.796857][3537:3537] CHIP:DMG: Received command for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 + [1660904553.796951][3537:3537] CHIP:ZCL: Received command to open commissioning window + [1660904553.797255][3537:3537] CHIP:IN: SecureSession[0xaaab142ef7f0]: Allocated Type:1 LSID:34523 + + Verify the Manual pairing code on the TH_CR1(chip-tool) Log: + + [1635864513.699433][3850:3855] CHIP:DMG: ICR moving to [CommandSen] + [1635864513.699489][3850:3855] CHIP:CTL: Manual pairing code: [36177160937] + [1635864513.699566][3850:3855] CHIP:CTL: SetupQRCode: [MT:00000CQM00YZN476420] + [1635864513.699636][3850:3855] CHIP:EM: Sending Standalone Ack for MessageCounter:2599714227 on exchange 60688i + [1635864513.699685][3850:3855] CHIP:IN: Prepared plaintext message 0xffff8a7cd960 to 0x0000000000000000 of type + disabled: true + + - label: + "TH_CR1 revokes the commissioning window on DUT_CE using + RevokeCommissioning command" PICS: CADMIN.S.C02.Rsp - timedInteractionTimeoutMs: 10000 + verification: | + On TH_CR1 send the below command + + ./chip-tool administratorcommissioning revoke-commissioning 1 0 --timedInteractionTimeoutMs 1000 + + Verify the Commissioning window is closed in DUT_CE(all-clusters-app) Log + + [1660901039.590891][3045:3045] CHIP:DMG: AccessControl: allowed + [1660901039.590962][3045:3045] CHIP:DMG: Received command for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0002 + [1660901039.591036][3045:3045] CHIP:ZCL: Received command to close commissioning window + [1660901039.591094][3045:3045] CHIP:SVR: Closing pairing window + [1660901039.591169][3045:3045] CHIP:IN: SecureSession[0xaaaab010d400]: Released - Type:1 LSID:14411 + + Verify the success response On TH_CR1(chip-tool) Log + + [1648115245106] [6681:3894448] CHIP: [DMG] StatusIB = + [1648115245106] [6681:3894448] CHIP: [DMG] { + [1648115245106] [6681:3894448] CHIP: [DMG] status = 0x0, + [1648115245106] [6681:3894448] CHIP: [DMG] }, + disabled: true - label: "TH_CR2 starts a commissioning process with DUT_CE" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: payload - response: - error: FAILURE - - - label: "TH_CR1 revokes the commissioning window on DUT_CE" - cluster: "Administrator Commissioning" - command: "RevokeCommissioning" + verification: | + On TH_CR2 send the below command + + Below is the example when using chip tool as controller (considering 36177160937 as the manual code generated by 1st controller) + ./chip-tool pairing code 2 36177160937 --commissioner-name beta + + verify you got the following message On TH_CR2(chip-tool) Log + + + [1663841939.843550][13897:13897] CHIP:DL: NVS set: chip-counters/total-operational-hours = 0 (0x0) + [1663841939.843617][13897:13897] CHIP:DL: Inet Layer shutdown + [1663841939.843673][13897:13897] CHIP:DL: BLE shutdown + [1663841939.843727][13897:13897] CHIP:DL: System Layer shutdown + [1663841939.844009][13897:13897] CHIP:TOO: Run command failure: ../../examples/chip-tool/commands/pairing/PairingCommand.cpp:151: CHIP Error 0x00000003: Incorrect state + disabled: true + + - label: + "TH_CR1 revokes the commissioning window on DUT_CE using + RevokeCommissioning command" PICS: CADMIN.S.C02.Rsp - timedInteractionTimeoutMs: 10000 - response: - error: FAILURE - - - label: "TH_CR1 writes the mandatory attribute NodeLabel of DUT_CE" - cluster: "Basic Information" - command: "writeAttribute" - attribute: "NodeLabel" - PICS: BINFO.S.A0005 - arguments: - value: "chiptest" + verification: | + On TH_CR1 send the below command + + ./chip-tool administratorcommissioning revoke-commissioning 1 0 --timedInteractionTimeoutMs 1000 + + verify you got the following message On TH_CR1(chip-tool) Log - - label: "TH_CR1 read the mandatory attribute NodeLabel of DUT_CE" - cluster: "Basic Information" - command: "readAttribute" - attribute: "NodeLabel" + + [1650524034.112257][15422:15427] CHIP:DMG: CommandId = 0x2, + [1650524034.112345][15422:15427] CHIP:DMG: }, + [1650524034.112456][15422:15427] CHIP:DMG: + [1650524034.112543][15422:15427] CHIP:DMG: StatusIB = + [1650524034.112632][15422:15427] CHIP:DMG: { + [1650524034.112727][15422:15427] CHIP:DMG: status = 0x01 (FAILURE), + [1650524034.112825][15422:15427] CHIP:DMG: cluster-status = 0x4, + [1650524034.112914][15422:15427] CHIP:DMG: }, + [1650524034.113005][15422:15427] CHIP:DMG: + [1650524034.113084][15422:15427] CHIP:DMG: }, + disabled: true + + - label: + "TH_CR1 writes and reads the Basic Information Clusters NodeLabel + mandatory attribute of DUT_CE" PICS: BINFO.S.A0005 - response: - value: "chiptest" + verification: | + On TH_CR1 send the below command + + ./chip-tool basicinformation write node-label te5new 1 0 + + Verify the Success response on the TH_CR1(chip-tool) Log: + + + [1649245940.789388][10110:10115] CHIP:DMG: + [1649245940.789454][10110:10115] CHIP:DMG: StatusIB = + [1649245940.789519][10110:10115] CHIP:DMG: { + [1649245940.789588][10110:10115] CHIP:DMG: status = 0x00 (SUCCESS), + [1649245940.789654][10110:10115] CHIP:DMG: }, + [1649245940.789719][10110:10115] CHIP:DMG: + [1649245940.789778][10110:10115] CHIP:DMG: }, + [1649245940.789841][10110:10115] CHIP:DMG: + [1649245940.789885][10110:10115] CHIP:DMG: ], + [1649245940.789941][10110:10115] CHIP:DMG: + [1649245940.789984][10110:10115] CHIP:DMG: InteractionModelRevision = 1 + [1649245940.790033][10110:10115] CHIP:DMG: } + [1649245940.790167][10110:10115] CHIP:DMG: WriteClient moving to [AwaitingDe] + + ./chip-tool basicinformation read node-label 1 0 + + Verify the Nodelabel response on the TH_CR1(chip-tool) Log: + + CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0005 DataVersion: 3061847068 + [1649245950.006849][10116:10121] CHIP:TOO: NodeLabel: te5new + [1649245950.007024][10116:10121] CHIP:EM: Sending Standalone Ack for MessageCounter:12495101 on exchange 24816i + disabled: true - label: - "TH_CR1 opens a new commissioning window on DUT_CE using wrong - PakeVerifier value using ECM" - cluster: "Administrator Commissioning" - command: "OpenCommissioningWindow" + "TH_CR1 opens a new commissioning window on DUT_CE using a + commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM but + with wrong PakeVerifier value" PICS: CADMIN.S.C00.Rsp - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "CommissioningTimeout" - value: 180 - - name: "PAKEPasscodeVerifier" - value: IncorrectPakeVerifier - - name: "Discriminator" - value: discriminator - - name: "Iterations" - value: 1000 - - name: "Salt" - value: "SPAKE2P Key Salt" - response: - error: FAILURE - clusterError: 3 - - - label: "TH_CR1 opens a new commissioning window on DUT_CE using ECM" - cluster: "Administrator Commissioning" - command: "OpenCommissioningWindow" + verification: | + On TH_CR1 send the below command + + ./chip-tool administratorcommissioning open-commissioning-window 200 \x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd 3841 1000 16 1 0 --timedInteractionTimeoutMs 1000 + + Verify the status on the TH_CR1(chip-tool) Log: + + [1656434435.691038][3836:3842] CHIP:DMG: { + [1656434435.691119][3836:3842] CHIP:DMG: EndpointId = 0x0, + [1656434435.691287][3836:3842] CHIP:DMG: ClusterId = 0x3c, + [1656434435.691377][3836:3842] CHIP:DMG: CommandId = 0x0, + [1656434435.691456][3836:3842] CHIP:DMG: }, + [1656434435.691548][3836:3842] CHIP:DMG: + [1656434435.691620][3836:3842] CHIP:DMG: StatusIB = + [1656434435.691707][3836:3842] CHIP:DMG: { + [1656434435.691788][3836:3842] CHIP:DMG: status = 0x01 (FAILURE), + [1656434435.691874][3836:3842] CHIP:DMG: cluster-status = 0x3, + [1656434435.691954][3836:3842] CHIP:DMG: }, + [1656434435.692041][3836:3842] CHIP:DMG: + [1656434435.692112][3836:3842] CHIP:DMG: }, + [1656434435.692191][3836:3842] CHIP:DMG: + [1656434435.692257][3836:3842] CHIP:DMG: }, + disabled: true + + - label: + "TH_CR1 opens a new commissioning window on DUT_CE using a + commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" PICS: CADMIN.S.C00.Rsp - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "CommissioningTimeout" - value: 180 - - name: "PAKEPasscodeVerifier" - value: PakeVerifier - - name: "Discriminator" - value: discriminator - - name: "Iterations" - value: 1000 - - name: "Salt" - value: "SPAKE2P Key Salt" - - - label: "Waiting after opening commissioning window" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: waitAfterCommissioning - - - label: "TH_CR1 opens another commissioning window on DUT_CE using ECM" - cluster: "Administrator Commissioning" - command: "OpenCommissioningWindow" + verification: | + On TH_CR1 send the below command + + ./chip-tool pairing open-commissioning-window 1 1 200 1000 3841 + + Verify the Open commisioning window on the DUT_CE(all-cluster-app) Log: + + [1660904553.796857][3537:3537] CHIP:DMG: Received command for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 + [1660904553.796951][3537:3537] CHIP:ZCL: Received command to open commissioning window + [1660904553.797255][3537:3537] CHIP:IN: SecureSession[0xaaab142ef7f0]: Allocated Type:1 LSID:34523 + + Verify the Manual pairing code on the TH_CR1(chip-tool) Log: + + [1635864513.699433][3850:3855] CHIP:DMG: ICR moving to [CommandSen] + [1635864513.699489][3850:3855] CHIP:CTL: Manual pairing code: [36177160937] + [1635864513.699566][3850:3855] CHIP:CTL: SetupQRCode: [MT:00000CQM00YZN476420] + [1635864513.699636][3850:3855] CHIP:EM: Sending Standalone Ack for MessageCounter:2599714227 on exchange 60688i + [1635864513.699685][3850:3855] CHIP:IN: Prepared plaintext message 0xffff8a7cd960 to 0x0000000000000000 of type + disabled: true + + - label: + "TH_CR1 opens another commissioning window on DUT_CE using a + commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" PICS: CADMIN.S.C00.Rsp - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "CommissioningTimeout" - value: 180 - - name: "PAKEPasscodeVerifier" - value: PakeVerifier - - name: "Discriminator" - value: discriminator - - name: "Iterations" - value: 1000 - - name: "Salt" - value: "SPAKE2P Key Salt" - response: - error: FAILURE - clusterError: 2 + verification: | + On TH_CR1 send the below command + + ./chip-tool pairing open-commissioning-window 1 1 200 1000 3840 + + Verify that the DUT_CE is rejecting the opening of second commissioning session with the response status 0x01 failure + + [1656405166.756822][5933:5938] CHIP:DMG: { + [1656405166.756927][5933:5938] CHIP:DMG: EndpointId = 0x0, + [1656405166.757033][5933:5938] CHIP:DMG: ClusterId = 0x3c, + [1656405166.757120][5933:5938] CHIP:DMG: CommandId = 0x0, + [1656405166.757222][5933:5938] CHIP:DMG: }, + [1656405166.757333][5933:5938] CHIP:DMG: + [1656405166.757452][5933:5938] CHIP:DMG: StatusIB = + [1656405166.757557][5933:5938] CHIP:DMG: { + [1656405166.757641][5933:5938] CHIP:DMG: status = 0x01 (FAILURE), + [1656405166.757745][5933:5938] CHIP:DMG: cluster-status = 0x2, + [1656405166.757846][5933:5938] CHIP:DMG: }, + [1656405166.757929][5933:5938] CHIP:DMG: + [1656405166.758014][5933:5938] CHIP:DMG: }, + disabled: true - label: "TH_CR2 starts a commissioning process with DUT_CE" PICS: CADMIN.S - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: payload - - - label: "DUT_CE is commissioned by TH_CR2" - identity: "beta" - cluster: "DelayCommands" - command: "WaitForCommissionee" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 + verification: | + On TH_CR2 send the below command + + Below is the example when using chip tool as controller (considering 36177160937 as the manual code generated by 1st controller) + ./chip-tool pairing code 2 36177160937 --commissioner-name beta + + Verify the below message in the TH_CR2(chip-tool) Log: + Device commissioning completed with success + disabled: true - label: "TH_CR1 tries to revoke the commissioning window on DUT_CE using RevokeCommissioning command" - cluster: "Administrator Commissioning" - command: "RevokeCommissioning" PICS: CADMIN.S.C02.Rsp - timedInteractionTimeoutMs: 10000 - response: - error: FAILURE - clusterError: 4 + verification: | + On TH_CR1 send the below command + + ./chip-tool administratorcommissioning revoke-commissioning 1 0 --timedInteractionTimeoutMs 1000 + + Verify that the DUT_CE is rejecting the opening of second commissioning session with the response status 0x01 failure + + [1656405166.756822][5933:5938] CHIP:DMG: { + [1656405166.756927][5933:5938] CHIP:DMG: EndpointId = 0x0, + [1656405166.757033][5933:5938] CHIP:DMG: ClusterId = 0x3c, + [1656405166.757120][5933:5938] CHIP:DMG: CommandId = 0x0, + [1656405166.757222][5933:5938] CHIP:DMG: }, + [1656405166.757333][5933:5938] CHIP:DMG: + [1656405166.757452][5933:5938] CHIP:DMG: StatusIB = + [1656405166.757557][5933:5938] CHIP:DMG: { + [1656405166.757641][5933:5938] CHIP:DMG: status = 0x01 (FAILURE), + [1656405166.757745][5933:5938] CHIP:DMG: cluster-status = 0x4, + [1656405166.757846][5933:5938] CHIP:DMG: }, + [1656405166.757929][5933:5938] CHIP:DMG: + [1656405166.758014][5933:5938] CHIP:DMG: }, + disabled: true - label: "TH_CR3 starts a commissioning process with DUT_CE" - identity: "gamma" - cluster: "CommissionerCommands" - command: "PairWithCode" PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId3 - - name: "payload" - value: payload - response: - error: FAILURE + verification: | + On TH_CR3 send the below command + + Below is the example when using chip tool as controller (considering 36177160937 as the manual code generated by 1st controller) + ./chip-tool pairing code 1 36177160937 --commissioner-name gamma + + verify you got the following message in the TH_CR3(chip-tool) log + CHIP:SC: PASESession timed out while waiting for a response from the peer. Expected message type was 33 + CHIP:TOO: Secure Pairing Failed + CHIP:TOO: Pairing Failure: ../../third_party/connectedhomeip/src/protocols/secure_channel/PASESession.cpp:324: CHIP Error 0x00000032: Timeout + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_6.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_6.yaml index a602517f4d1034..6f39fc88d0aa72 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_6.yaml @@ -87,7 +87,7 @@ tests: verification: | On TH_CR1 send the below command - ubuntu@ubuntu:~/may16_cntrl/connectedhomeip/examples/chip-tool/out/debug$ avahi-browse -rt _matterc._udp + avahi-browse -rt _matterc._udp + eth0 IPv6 05EB1D3652D2F544 _matterc._udp local + eth0 IPv6 7869CD25CBF12D42 _matterc._udp local = eth0 IPv6 7869CD25CBF12D42 _matterc._udp local @@ -249,6 +249,15 @@ tests: - name: "nodeId" value: nodeId2 + - label: + "TH2 reads CurrentFabricIndex attribute and save it for future use." + identity: "beta" + command: "readAttribute" + cluster: "Operational Credentials" + attribute: "CurrentFabricIndex" + response: + saveAs: TH2FabricIndex + - label: "TH_CR1 tries to revoke the commissioning window on DUT_CE using RevokeCommissioning command" @@ -273,3 +282,14 @@ tests: value: payload response: error: FAILURE + + - label: "Remove TH2 FabricIndex" + PICS: OPCREDS.S.C0a.Rsp && CADMIN.S + identity: "beta" + cluster: "Operational Credentials" + command: "RemoveFabric" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "FabricIndex" + value: TH2FabricIndex diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_7.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_7.yaml index b68d0318cd602b..59f6a8d4170577 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_7.yaml @@ -275,7 +275,9 @@ tests: verify you got the following message in the TH_CR3(chip-tool) log - CHIP:SC: PASESession timed out while waiting for a response from the peer. Expected message type was 33 - CHIP:TOO: Secure Pairing Failed - CHIP:TOO: Pairing Failure: ../../third_party/connectedhomeip/src/protocols/secure_channel/PASESession.cpp:324: CHIP Error 0x00000032: Timeout + [1678796869.645576][648903:648903] CHIP:DL: NVS set: chip-counters/total-operational-hours = 0 (0x0) + [1678796869.645584][648903:648903] CHIP:DL: Inet Layer shutdown + [1678796869.645589][648903:648903] CHIP:DL: BLE shutdown + [1678796869.645596][648903:648903] CHIP:DL: System Layer shutdown + [1678796869.645693][648903:648903] CHIP:TOO: Run command failure: ../../commands/pairing/PairingCommand.cpp:215: CHIP Error 0x00000003: Incorrect state disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_9.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_9.yaml index 66756672655b2b..fa95bd1e31ea3e 100644 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_CADMIN_1_9.yaml @@ -11,506 +11,133 @@ # 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: - 24.1.9. [TC-CADMIN-1.9] Device exit commissioning mode after 20 failed + 4.1.9. [TC-CADMIN-1.9] Device exit commissioning mode after 20 failed commission attempts [ECM] [DUT - Commissionee] -PICS: - - CADMIN.S - config: nodeId: 0x12344321 - timeout: 700 - nodeIdForDuplicateCommissioning: - type: node_id - defaultValue: 0x11 - nodeId2: - type: node_id - defaultValue: 0xCAFE - nodeId3: - type: node_id - defaultValue: 0xC00FEE + cluster: "Basic Information" endpoint: 0 - waitAfterCommissioning: - type: int16u - defaultValue: 5000 - discriminator: - type: int16u - defaultValue: 3840 - correctPayload: - type: char_string - defaultValue: "MT:-24J0AFN00I31506010" - incorrectSetupCodePayload: - type: char_string - defaultValue: "MT:-24J0AFN00I.0648G00" - PakeVerifier: - type: octet_string - defaultValue: "hex:06c756dffcd722653452a12dcd945d8c54da2b0f3cbd1b4dc3f1adb223aeb26b047cd24c96866f979b1d83ec50e2b4ae30cdf2fdb32bd8a211b837dc94edcd56f4d14377191076bfc59d99b7dd3053efd6f02c4434f2bdd27aa4f9cea70d738e4c" tests: - - label: "Precondition: Reset Devices to factory defaults" - PICS: PICS_SDK_CI_ONLY - cluster: "SystemCommands" - command: "FactoryReset" - - - label: "Precondition: Reset Devices to factory defaults" + - label: "Precondition" verification: | Reset Devices to factory defaults - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Factory Reset the DUT and enter 'y' after success" - - name: "expectedValue" - value: "y" + disabled: true - label: "TH_CR1 starts a commissioning process with DUT_CE" - cluster: "DelayCommands" - command: "WaitForCommissionee" PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId + verification: | + "1. Provision the DUT_CE (all-cluster-app) device using TH_CR1 (chip-tool ) on the raspi" + disabled: true - - label: "TH_CR1 opens a new commissioning window on DUT_CE" - cluster: "Administrator Commissioning" - command: "OpenCommissioningWindow" - timedInteractionTimeoutMs: 10000 + - label: + "TH_CR1 opens a commissioning window on DUT_CE using a commissioning + timeout of PIXIT.CADMIN.CwDuration seconds using ECM" PICS: CADMIN.S.C00.Rsp - arguments: - values: - - name: "CommissioningTimeout" - value: 900 - - name: "PAKEPasscodeVerifier" - value: PakeVerifier - - name: "Discriminator" - value: discriminator - - name: "Iterations" - value: 1000 - - name: "Salt" - value: "SPAKE2P Key Salt" - - - label: "Waiting after opening commissioning window" - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: waitAfterCommissioning - - #Check for DNS-SD advertisement CM is not possible in YAML - - label: "Verify that the DNS-SD advertisement shows CM=2" verification: | On TH_CR1 send the below command - "ubuntu@ubuntu:~/may16_cntrl/connectedhomeip/examples/chip-tool/out/debug$ avahi-browse -rt _matterc._udp - + eth0 IPv6 B755245DE9E5E186 _matterc._udp local - = eth0 IPv6 B755245DE9E5E186 _matterc._udp local - hostname = [E45F010F27530000.local] - address = [fe80::e65f:1ff:fe0f:2753] - port = [5540] - txt = [""PI="" ""PH=36"" ""CM=2"" ""D=3840"" ""T=1"" ""SAI=300"" ""SII=5000"" ""VP=65521+32769""]" - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup - code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: incorrectSetupCodePayload - - name: discoverOnce - value: true - response: - error: FAILURE - - - label: - "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup - code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: incorrectSetupCodePayload - - name: discoverOnce - value: true - response: - error: FAILURE - - - label: - "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup - code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: incorrectSetupCodePayload - - name: discoverOnce - value: true - response: - error: FAILURE + ./chip-tool pairing open-commissioning-window 1 1 900 1000 3841 - - label: - "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup - code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: incorrectSetupCodePayload - - name: discoverOnce - value: true - response: - error: FAILURE - - - label: - "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup - code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: incorrectSetupCodePayload - - name: discoverOnce - value: true - response: - error: FAILURE + Verify the Open commisioning window on the DUT_CE(all-cluster-app) Log: - - label: - "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup - code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: incorrectSetupCodePayload - - name: discoverOnce - value: true - response: - error: FAILURE + [1660904553.796857][3537:3537] CHIP:DMG: Received command for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 + [1660904553.796951][3537:3537] CHIP:ZCL: Received command to open commissioning window + [1660904553.797255][3537:3537] CHIP:IN: SecureSession[0xaaab142ef7f0]: Allocated Type:1 LSID:34523 - - label: - "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup - code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: incorrectSetupCodePayload - - name: discoverOnce - value: true - response: - error: FAILURE + Verify the Manual pairing code on the TH_CR1(chip-tool) Log: - - label: - "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup - code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: incorrectSetupCodePayload - - name: discoverOnce - value: true - response: - error: FAILURE + [1635864513.699433][3850:3855] CHIP:DMG: ICR moving to [CommandSen] + [1635864513.699489][3850:3855] CHIP:CTL: Manual pairing code: [36177160937] + [1635864513.699566][3850:3855] CHIP:CTL: SetupQRCode: [MT:00000CQM00YZN476420] + [1635864513.699636][3850:3855] CHIP:EM: Sending Standalone Ack for MessageCounter:2599714227 on exchange 60688i + [1635864513.699685][3850:3855] CHIP:IN: Prepared plaintext message 0xffff8a7cd960 to 0x0000000000000000 of type + disabled: true - - label: - "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup - code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: incorrectSetupCodePayload - - name: discoverOnce - value: true - response: - error: FAILURE + - label: "DNS-SD records shows DUT_CE advertising" + verification: | + On TH_CR1 send the below command + avahi-browse -rt _matterc._udp - - label: - "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup - code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: incorrectSetupCodePayload - - name: discoverOnce - value: true - response: - error: FAILURE + + eth0 IPv6 B755245DE9E5E186 _matterc._udp local + = eth0 IPv6 B755245DE9E5E186 _matterc._udp local + hostname = [E45F010F27530000.local] + address = [fe80::e65f:1ff:fe0f:2753] + port = [5540] + txt = [""PI="" ""PH=36"" ""CM=2"" ""D=3840"" ""T=1"" ""SAI=300"" ""SII=5000"" ""VP=65521+32769""]" + disabled: true - label: - "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup - code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" + "Before the expiration of PIXIT.CADMIN.CwDuration set in step 2, Set + up a TH_CR2 to start attempting to do PASE to DUT_CE and failing 20 + times. This can be done using a valid onboarding payload with an + incorrect setupcode" PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: incorrectSetupCodePayload - - name: discoverOnce - value: true - response: - error: FAILURE + verification: | + On TH_CR2 send the below command - - label: - "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup - code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: incorrectSetupCodePayload - - name: discoverOnce - value: true - response: - error: FAILURE + The manualcode with wrong setupcode is generated by using below command + ./chip-tool payload generate-manualcode --discriminator 0xF00 --setup-pin-code 20202022 --version 0 --vendor-id 0xFFF1 --product-id 0x8001 --commissioning-mode 0 + [1658404815.887421][2367:2367] CHIP:TOO: Manual Code: 34970212338 - - label: - "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup - code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: incorrectSetupCodePayload - - name: discoverOnce - value: true - response: - error: FAILURE + Attempt to do pairing with wrong manual code for 20 times + ./chip-tool pairing code 2 34970212338 --timeout 40 --commissioner-name beta - - label: - "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup - code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: incorrectSetupCodePayload - - name: discoverOnce - value: true - response: - error: FAILURE + Verify the failure response in any one of following error for 20 attempts of wrong passcode in TH_CR2(chip-tool) - - label: - "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup - code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: incorrectSetupCodePayload - - name: discoverOnce - value: true - response: - error: FAILURE + [1660903056.889713][31261:31266] CHIP:SC: Failed to verify peer's MAC. This can happen when setup code is incorrect. + [1660903056.889744][31261:31266] CHIP:SC: Sending status report. Protocol code 2, exchange 28732 + [1660903056.889781][31261:31266] CHIP:EM: Piggybacking Ack for MessageCounter:72597021 on exchange: 28732i + [1660903056.889817][31261:31266] CHIP:IN: Prepared unauthenticated message 0x7fbf5403c308 to 0x0000000000000000 (0) of type 0x40 and protocolId (0, 0) on exchange 28732i with MessageCounter:110107069. + [1660903056.889855][31261:31266] CHIP:IN: Sending unauthenticated msg 0x7fbf5403c308 with MessageCounter:110107069 to 0x0000000000000000 at monotonic time: 00000000012CB695 msec + [1660903056.890044][31261:31266] CHIP:IN: SecureSession[0x55686a679ff0]: Released - Type:1 LSID:10585 + [1660903056.890094][31261:31266] CHIP:SC: Failed during PASE session setup: ../../third_party/connectedhomeip/src/crypto/CHIPCryptoPALOpenSSL.cpp:1437: CHIP Error 0x000000AC: Internal error + (or) + [1678862522.832525][700613:700613] CHIP:DL: NVS set: chip-counters/total-operational-hours = 0 (0x0) + [1678862522.832537][700613:700613] CHIP:DL: Inet Layer shutdown + [1678862522.832545][700613:700613] CHIP:DL: BLE shutdown + [1678862522.832554][700613:700613] CHIP:DL: System Layer shutdown + [1678862522.832663][700613:700613] CHIP:TOO: Run command failure: ../../commands/pairing/PairingCommand.cpp:215: CHIP Error 0x00000003: Incorrect state + disabled: true - label: - "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup - code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" + "Before the expiration of PIXIT.CADMIN.CwDuration set in step 2, + TH_CR2 attempts to do PASE to DUT_CE using the correct onboarding + payload" PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: incorrectSetupCodePayload - - name: discoverOnce - value: true - response: - error: FAILURE + verification: | + On TH_CR2 send the below command (with correct passcode) - - label: - "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup - code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: incorrectSetupCodePayload - - name: discoverOnce - value: true - response: - error: FAILURE + ./chip-tool pairing code 2 36177160937 --commissioner-name beta + Verify the following error on 21st attempt using correct passcode in TH_CR2(chip-tool) - - label: - "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup - code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: incorrectSetupCodePayload - - name: discoverOnce - value: true - response: - error: FAILURE + [1665484807.015876][5399:5399] CHIP:DL: renamed tmp file to file (/tmp/chip_counters.ini) + [1665484807.016042][5399:5399] CHIP:DL: NVS set: chip-counters/total-operational-hours = 0 (0x0) + [1665484807.016108][5399:5399] CHIP:DL: Inet Layer shutdown + [1665484807.016163][5399:5399] CHIP:DL: BLE shutdown + [1665484807.016215][5399:5399] CHIP:DL: System Layer shutdown + [1665484807.016460][5399:5399] CHIP:TOO: Run command failure: ../../commands/pairing/PairingCommand.cpp:164: CHIP Error 0x00000003: Incorrect state + disabled: true - label: - "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup - code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" + "TH_CR3 starts a commissioning process with DUT_CE using the correct + PAKEVerifier" PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: incorrectSetupCodePayload - - name: discoverOnce - value: true - response: - error: FAILURE + verification: | + On TH_CR3 send the below command (with correct passcode) - - label: - "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup - code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: incorrectSetupCodePayload - - name: discoverOnce - value: true - response: - error: FAILURE + ./chip-tool pairing code 3 36177160938 (With correct passcode) --commissioner-name gamma - # This step must match the verification step above where we checked `payload` - - label: - "TH_CR2 starts a commissioning process with DUT_CE using valid setup - code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: correctPayload - response: - error: FAILURE + Verify the following error on correct passcode in TH_CR3(chip-tool) - - label: "TH_CR3 starts a commissioning process with DUT_CE" - identity: "gamma" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId3 - - name: "payload" - value: correctPayload - response: - error: FAILURE + [1665484807.015876][5399:5399] CHIP:DL: renamed tmp file to file (/tmp/chip_counters.ini) + [1665484807.016042][5399:5399] CHIP:DL: NVS set: chip-counters/total-operational-hours = 0 (0x0) + [1665484807.016108][5399:5399] CHIP:DL: Inet Layer shutdown + [1665484807.016163][5399:5399] CHIP:DL: BLE shutdown + [1665484807.016215][5399:5399] CHIP:DL: System Layer shutdown + [1665484807.016460][5399:5399] CHIP:TOO: Run command failure: ../../commands/pairing/PairingCommand.cpp:164: CHIP Error 0x00000003: Incorrect state + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CC_2_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_2_1.yaml index 23629e33d0232d..6330f250c2077d 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_2_1.yaml @@ -92,7 +92,7 @@ tests: maxValue: 4 - label: "TH reads CompensationText attribute from DUT" - PICS: CC.S.A0005 + PICS: CC.S.A0006 command: "readAttribute" attribute: "CompensationText" response: diff --git a/src/app/tests/suites/certification/Test_TC_CC_2_2.yaml b/src/app/tests/suites/certification/Test_TC_CC_2_2.yaml index 423ab6d27bfbfb..e27f0167247638 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_2_2.yaml @@ -44,7 +44,7 @@ tests: verification: | ./chip-tool colorcontrol read current-hue 1 1 - Verify response contains an uint8 in TH(all-clusters-app) Logs: + Verify response contains an uint8 value in TH(all-clusters-app) Logs: ReportDataMessage = [1666862430.291431][25129:25129] CHIP:DMG: { @@ -79,7 +79,7 @@ tests: verification: | ./chip-tool colorcontrol read current-saturation 1 1 - Verify response contains an uint8 in TH(all-clusters-app) Logs: + Verify response contains an uint8 value in TH(all-clusters-app) Logs: ReportDataMessage = [1666862500.428470][25129:25129] CHIP:DMG: { @@ -115,7 +115,7 @@ tests: verification: | ./chip-tool colorcontrol read remaining-time 1 1 - Verify response contains an uint16 in TH(all-clusters-app) Logs: + Verify response contains an uint16 value in TH(all-clusters-app) Logs: ReportDataMessage = [1666862536.301497][25129:25129] CHIP:DMG: { @@ -150,7 +150,7 @@ tests: verification: | ./chip-tool colorcontrol read current-x 1 1 - Verify response contains an uint16 in TH(all-clusters-app) Logs: + Verify response contains an uint16 value in TH(all-clusters-app) Logs: [ReportDataMessage = [1666862572.154251][25129:25129] CHIP:DMG: { @@ -224,7 +224,7 @@ tests: verification: | ./chip-tool colorcontrol read drift-compensation 1 1 - Verify response contains an enum8 in TH(all-clusters-app) Logs: + Verify response contains an enum8 [Min:0 Max:4] in TH(all-clusters-app) Logs: ReportDataMessage = @@ -263,7 +263,7 @@ tests: ./chip-tool colorcontrol read compensation-text 1 1 - Verify response contains a string in TH(all-clusters-app) Logs: + Verify response contains a string [Max:254] in TH(all-clusters-app) Logs: ReportDataMessage = @@ -300,7 +300,7 @@ tests: verification: | ./chip-tool colorcontrol read color-temperature-mireds 1 1 - Verify response contains an uint16 in TH(all-clusters-app) Logs: + Verify response contains an uint16 [Min:0 Max:0xfeff] in TH(all-clusters-app) Logs: ReportDataMessage = @@ -337,7 +337,7 @@ tests: ./chip-tool colorcontrol read color-mode 1 1 - Verify response contains an enum8 in TH(all-clusters-app) Logs: + Verify response contains an enum8 [Min:0 Max:2] in TH(all-clusters-app) Logs: ReportDataMessage = @@ -375,7 +375,7 @@ tests: ./chip-tool colorcontrol read options 1 1 - Verify response contains an bitmap8 in TH(all-clusters-app) Logs: + Verify response contains a bitmap8(0,1,2,3,4) in TH(all-clusters-app) Logs: ReportDataMessage = @@ -411,7 +411,7 @@ tests: verification: | ./chip-tool colorcontrol read enhanced-current-hue 1 1 - Verify response contains an uint16 in TH(all-clusters-app) Logs: + Verify response contains an uint16 value in TH(all-clusters-app) Logs: ReportDataMessage = @@ -449,7 +449,7 @@ tests: ./chip-tool colorcontrol read enhanced-color-mode 1 1 - Verify response contains an enum8 in TH(all-clusters-app) Logs: + Verify response contains an enum8 (0, 1, 2, 3) in TH(all-clusters-app) Logs: ReportDataMessage = @@ -487,7 +487,7 @@ tests: ./chip-tool colorcontrol read color-loop-active 1 1 - Verify response contains an uint8 in TH(all-clusters-app) Logs: + Verify response contains an uint8 value in TH(all-clusters-app) Logs: ReportDataMessage = @@ -523,7 +523,7 @@ tests: verification: | ./chip-tool colorcontrol read color-loop-direction 1 1 - Verify response contains an uint8 in TH(all-clusters-app) Logs: + Verify response contains an uint8 value in TH(all-clusters-app) Logs: ReportDataMessage = [1666862856.253192][25129:25129] CHIP:DMG: { @@ -559,7 +559,7 @@ tests: ./chip-tool colorcontrol read color-loop-time 1 1 - Verify response contains an uint16 in TH(all-clusters-app) Logs: + Verify response contains an uint16 value in TH(all-clusters-app) Logs: ReportDataMessage = [1666862943.614989][25380:25380] CHIP:DMG: { @@ -597,7 +597,7 @@ tests: ./chip-tool colorcontrol read color-loop-start-enhanced-hue 1 1 - Verify response contains an uint16 in TH(all-clusters-app) Logs: + Verify response contains an uint16 value in TH(all-clusters-app) Logs: ReportDataMessage = [1666862967.033733][25380:25380] CHIP:DMG: { @@ -635,7 +635,7 @@ tests: ./chip-tool colorcontrol read color-loop-stored-enhanced-hue 1 1 - Verify response contains an uint16 in TH(all-clusters-app) Logs: + Verify response contains an uint16 value in TH(all-clusters-app) Logs: ReportDataMessage = @@ -672,7 +672,7 @@ tests: ./chip-tool colorcontrol read color-capabilities 1 1 - Verify response contains an map16 in TH(all-clusters-app) Logs: + Verify response contains an map16 [Min:0 Max:0x001f] in TH(all-clusters-app) Logs: ReportDataMessage = @@ -711,7 +711,7 @@ tests: ./chip-tool colorcontrol read color-temp-physical-min-mireds 1 1 - Verify response contains an uint16 in TH(all-clusters-app) Logs: + Verify response contains an uint16 value in TH(all-clusters-app) Logs: ReportDataMessage = @@ -750,7 +750,7 @@ tests: ./chip-tool colorcontrol read color-temp-physical-max-mireds 1 1 - Verify response contains an uint16 in TH(all-clusters-app) Logs: + Verify response contains an uint16 value in TH(all-clusters-app) Logs: ReportDataMessage = @@ -789,7 +789,7 @@ tests: ./chip-tool colorcontrol read couple-color-temp-to-level-min-mireds 1 1 - Verify response contains an uint16 in TH(all-clusters-app) Logs: + Verify response contains an uint16 value in TH(all-clusters-app) Logs: ReportDataMessage = @@ -827,7 +827,7 @@ tests: verification: | ./chip-tool colorcontrol read start-up-color-temperature-mireds 1 1 - Verify response contains an uint16 in TH(all-clusters-app) Logs: + Verify response contains an uint16 value in TH(all-clusters-app) Logs: ReportDataMessage = @@ -863,7 +863,7 @@ tests: verification: | ./chip-tool colorcontrol read number-of-primaries 1 1 - Verify response contains an uint8 in TH(all-clusters-app) Logs: + Verify response contains an uint8 value in TH(all-clusters-app) Logs: ReportDataMessage = @@ -900,7 +900,7 @@ tests: ./chip-tool colorcontrol read primary1x 1 1 - Verify response contains an uint16 in TH(all-clusters-app) Logs: + Verify response contains an uint16 value in TH(all-clusters-app) Logs: [ReportDataMessage = @@ -938,7 +938,7 @@ tests: ./chip-tool colorcontrol read primary1y 1 1 - Verify response contains an uint16 in TH(all-clusters-app) Logs: + Verify response contains an uint16 value in TH(all-clusters-app) Logs: ReportDataMessage = @@ -975,7 +975,7 @@ tests: ./chip-tool colorcontrol read primary1intensity 1 1 - Verify response contains an uint8 in TH(all-clusters-app) Logs: + Verify response contains an uint8 value in TH(all-clusters-app) Logs: ReportDataMessage = @@ -1012,7 +1012,7 @@ tests: ./chip-tool colorcontrol read primary2x 1 1 - Verify response contains an uint16 in TH(all-clusters-app) Logs: + Verify response contains an uint16 value in TH(all-clusters-app) Logs: ReportDataMessage = @@ -1049,7 +1049,7 @@ tests: ./chip-tool colorcontrol read primary2y 1 1 - Verify response contains an uint16 in TH(all-clusters-app) Logs: + Verify response contains an uint16 value in TH(all-clusters-app) Logs: ReportDataMessage = @@ -1086,7 +1086,7 @@ tests: verification: | ./chip-tool colorcontrol read primary2intensity 1 1 - Verify response contains an uint8 in TH(all-clusters-app) Logs: + Verify response contains an uint8 value in TH(all-clusters-app) Logs: ReportDataMessage = @@ -1122,7 +1122,7 @@ tests: verification: | ./chip-tool colorcontrol read primary3x 1 1 - Verify response contains an uint16 in TH(all-clusters-app) Logs: + Verify response contains an uint16 value in TH(all-clusters-app) Logs: ReportDataMessage = [1666863405.983475][25380:25380] CHIP:DMG: { @@ -1158,7 +1158,7 @@ tests: verification: | ./chip-tool colorcontrol read primary3y 1 1 - Verify response contains an uint16 in TH(all-clusters-app) Logs: + Verify response contains an uint16 value in TH(all-clusters-app) Logs: ReportDataMessage = @@ -1194,7 +1194,7 @@ tests: verification: | ./chip-tool colorcontrol read primary3intensity 1 1 - Verify response contains an uint8 in TH(all-clusters-app) Logs: + Verify response contains an uint8 value in TH(all-clusters-app) Logs: ReportDataMessage = [1666863464.087690][25380:25380] CHIP:DMG: { @@ -1233,7 +1233,7 @@ tests: ./chip-tool colorcontrol read primary4x 1 1 - Verify response contains an uint16 in TH(all-clusters-app) Logs: + Verify response contains an uint16 value in TH(all-clusters-app) Logs: ReportDataMessage = @@ -1270,7 +1270,7 @@ tests: ./chip-tool colorcontrol read primary4y 1 1 - Verify response contains an uint16 in TH(all-clusters-app) Logs: + Verify response contains an uint16 value in TH(all-clusters-app) Logs: ReportDataMessage = @@ -1306,7 +1306,7 @@ tests: verification: | ./chip-tool colorcontrol read primary4intensity 1 1 - Verify response contains an uint8 in TH(all-clusters-app) Logs: + Verify response contains an uint8 value in TH(all-clusters-app) Logs: ReportDataMessage = @@ -1342,7 +1342,7 @@ tests: verification: | ./chip-tool colorcontrol read primary5x 1 1 - Verify response contains an uint16 in TH(all-clusters-app) Logs: + Verify response contains an uint16 value in TH(all-clusters-app) Logs: ReportDataMessage = [1666863587.103204][25380:25380] CHIP:DMG: { @@ -1377,7 +1377,7 @@ tests: verification: | ./chip-tool colorcontrol read primary5y 1 1 - Verify response contains an uint16 in TH(all-clusters-app) Logs: + Verify response contains an uint16 value in TH(all-clusters-app) Logs: ReportDataMessage = @@ -1414,7 +1414,7 @@ tests: ./chip-tool colorcontrol read primary5intensity 1 1 - Verify response contains an uint8 in TH(all-clusters-app) Logs: + Verify response contains an uint8 value in TH(all-clusters-app) Logs: ReportDataMessage = @@ -1450,7 +1450,7 @@ tests: verification: | ./chip-tool colorcontrol read primary6x 1 1 - Verify response contains an uint16 in TH(all-clusters-app) Logs: + Verify response contains an uint16 value in TH(all-clusters-app) Logs: ReportDataMessage = @@ -1486,7 +1486,7 @@ tests: verification: | ./chip-tool colorcontrol read primary6y 1 1 - Verify response contains an uint16 in TH(all-clusters-app) Logs: + Verify response contains an uint16 value in TH(all-clusters-app) Logs: ReportDataMessage = @@ -1523,7 +1523,7 @@ tests: ./chip-tool colorcontrol read primary6intensity 1 1 - Verify response contains an uint8 in TH(all-clusters-app) Logs: + Verify response contains an uint8 value in TH(all-clusters-app) Logs: ReportDataMessage = @@ -1560,7 +1560,7 @@ tests: ./chip-tool colorcontrol read white-point-x 1 1 - Verify response contains an uint16 in TH(all-clusters-app) Logs: + Verify response contains an uint16 value in TH(all-clusters-app) Logs: ReportDataMessage = @@ -1596,7 +1596,7 @@ tests: verification: | ./chip-tool colorcontrol read white-point-y 1 1 - Verify response contains an uint16 in TH(all-clusters-app) Logs: + Verify response contains an uint16 value in TH(all-clusters-app) Logs: ReportDataMessage = @@ -1634,7 +1634,7 @@ tests: ./chip-tool colorcontrol read color-point-rx 1 1 - Verify response contains an uint16 in TH(all-clusters-app) Logs: + Verify response contains an uint16 value in TH(all-clusters-app) Logs: ReportDataMessage = @@ -1672,7 +1672,7 @@ tests: ./chip-tool colorcontrol read color-point-ry 1 1 - Verify response contains an uint16 in TH(all-clusters-app) Logs: + Verify response contains an uint16 value in TH(all-clusters-app) Logs: ReportDataMessage = @@ -1711,7 +1711,7 @@ tests: ./chip-tool colorcontrol read color-point-rintensity 1 1 - Verify response contains an uint8 in TH(all-clusters-app) Logs: + Verify response contains an uint8 value in TH(all-clusters-app) Logs: ReportDataMessage = @@ -1749,7 +1749,7 @@ tests: ./chip-tool colorcontrol read color-point-gx 1 1 - Verify response contains an uint16 in TH(all-clusters-app) Logs: + Verify response contains an uint16 value in TH(all-clusters-app) Logs: ReportDataMessage = @@ -1787,7 +1787,7 @@ tests: ./chip-tool colorcontrol read color-point-gy 1 1 - Verify response contains an uint16 in TH(all-clusters-app) Logs: + Verify response contains an uint16 value in TH(all-clusters-app) Logs: ReportDataMessage = @@ -1826,7 +1826,7 @@ tests: ./chip-tool colorcontrol read color-point-gintensity 1 1 - Verify response contains an uint8 in TH(all-clusters-app) Logs: + Verify response contains an uint8 value in TH(all-clusters-app) Logs: ReportDataMessage = @@ -1864,7 +1864,7 @@ tests: ./chip-tool colorcontrol read color-point-bx 1 1 - Verify response contains an uint16 in TH(all-clusters-app) Logs: + Verify response contains an uint16 value in TH(all-clusters-app) Logs: ReportDataMessage = @@ -1902,7 +1902,7 @@ tests: ./chip-tool colorcontrol read color-point-by 1 1 - Verify response contains an uint16 in TH(all-clusters-app) Logs: + Verify response contains an uint16 value in TH(all-clusters-app) Logs: ReportDataMessage = @@ -1941,7 +1941,7 @@ tests: ./chip-tool colorcontrol read color-point-bintensity 1 1 - Verify response contains an uint8 in TH(all-clusters-app) Logs: + Verify response contains an uint8 value in TH(all-clusters-app) Logs: ReportDataMessage = diff --git a/src/app/tests/suites/certification/Test_TC_CC_3_4.yaml b/src/app/tests/suites/certification/Test_TC_CC_3_4.yaml index 682d30ffbd9e49..08bef983ed74d7 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_3_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_3_4.yaml @@ -27,6 +27,11 @@ tests: - label: "Note" verification: | For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. + + Commission TH(all-clusters-app) to TH(chip-tool) using below command + + TH(all-clusters-app) : sudo ./chip-all-clusters-app --trace_decode 1 + TH(chip-tool) : ./chip-tool pairing onnetwork 1 20202021 --trace_decode 1 disabled: true - label: "Precondition" diff --git a/src/app/tests/suites/certification/Test_TC_CC_5_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_5_1.yaml index 43474238f24d1b..113f2a8218f5c1 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_5_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_5_1.yaml @@ -603,3 +603,16 @@ tests: constraints: minValue: 0 maxValue: 3 + + - label: "Turn off light that we turned on" + PICS: OO.S.C00.Rsp + cluster: "On/Off" + command: "Off" + + - label: "Check on/off attribute value is false after off command" + cluster: "On/Off" + command: "readAttribute" + attribute: "OnOff" + PICS: OO.S.A0000 + response: + value: 0 diff --git a/src/app/tests/suites/certification/Test_TC_CC_7_5.yaml b/src/app/tests/suites/certification/Test_TC_CC_7_5.yaml index 956d166d45e573..04cf84c81df1a4 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_7_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_7_5.yaml @@ -372,6 +372,35 @@ tests: [1666947536.315798][52174:52174] CHIP:DMG: SuppressResponse = true, [1666947536.315803][52174:52174] CHIP:DMG: InteractionModelRevision = 1 [1666947536.315805][52174:52174] CHIP:DMG: } + + ./chip-tool colorcontrol read current-saturation 1 1 + After 20 Seconds, Verify response contains Current-saturation value in TH(all-clusters-app) Logs: + ReportDataMessage = + [1666947452.160090][52174:52174] CHIP:DMG: { + [1666947452.160094][52174:52174] CHIP:DMG: AttributeReportIBs = + [1666947452.160100][52174:52174] CHIP:DMG: [ + [1666947452.160105][52174:52174] CHIP:DMG: AttributeReportIB = + [1666947452.160113][52174:52174] CHIP:DMG: { + [1666947452.160117][52174:52174] CHIP:DMG: AttributeDataIB = + [1666947452.160122][52174:52174] CHIP:DMG: { + [1666947452.160127][52174:52174] CHIP:DMG: DataVersion = 0x257547d6, + [1666947452.160132][52174:52174] CHIP:DMG: AttributePathIB = + [1666947452.160140][52174:52174] CHIP:DMG: { + [1666947452.160145][52174:52174] CHIP:DMG: Endpoint = 0x1, + [1666947452.160151][52174:52174] CHIP:DMG: Cluster = 0x300, + [1666947452.160156][52174:52174] CHIP:DMG: Attribute = 0x0000_0001, + [1666947452.160162][52174:52174] CHIP:DMG: } + [1666947452.160168][52174:52174] CHIP:DMG: + [1666947452.160174][52174:52174] CHIP:DMG: Data = 100, + [1666947452.160178][52174:52174] CHIP:DMG: }, + [1666947452.160186][52174:52174] CHIP:DMG: + [1666947452.160191][52174:52174] CHIP:DMG: }, + [1666947452.160197][52174:52174] CHIP:DMG: + [1666947452.160201][52174:52174] CHIP:DMG: ], + [1666947452.160209][52174:52174] CHIP:DMG: + [1666947452.160213][52174:52174] CHIP:DMG: SuppressResponse = true, + [1666947452.160218][52174:52174] CHIP:DMG: InteractionModelRevision = 1 + [1666947452.160222][52174:52174] CHIP:DMG: } disabled: true - label: "DUT sends StopMoveStep command to TH." diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_12.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_12.yaml index f68e201538cbe7..346661683c69c2 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_12.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_12.yaml @@ -245,7 +245,7 @@ tests: "TH sends AddOrUpdateThre adNetwork command to the DUT with the OperationalDatase t field set to PIXIT.CNET.THRE AD_2ND_OPERATI ONALDATASET and Breadcrumb field set to 1" - PICS: CNET.S.C02.Rsp && CNET.S.C05.Tx + PICS: CNET.S.C03.Rsp && CNET.S.C05.Tx verification: | Mark as not applicable and proceed to next step disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_14.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_14.yaml index eafa43790a9f43..676e4c9d978207 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_14.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_14.yaml @@ -148,7 +148,7 @@ tests: should be repeated RemainingNetwor kSlots times using DIFFERENT OperationalDatase t values and Breadcrumb set to 1. Note that these credentials are NOT required to be connectable." - PICS: CNET.S.C02.Rsp && CNET.S.C05.Tx + PICS: CNET.S.C03.Rsp && CNET.S.C05.Tx verification: | ./chip-tool networkcommissioning add-or-update-thread-network hex:1011101122222229 1 0 --Breadcrumb 1 @@ -274,7 +274,7 @@ tests: should be repeated RemainingNetwor kSlots times using DIFFERENT OperationalDatase t values and Breadcrumb set to 1. Note that these credentials are NOT required to be connectable" - PICS: CNET.S.C02.Rsp && CNET.S.C05.Tx + PICS: CNET.S.C03.Rsp && CNET.S.C05.Tx verification: | The test case is not verifiable in RPI platform. As MaxNetworks value is 1 but expected is 4 ( Pre-Condition) diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_15.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_15.yaml index 73385f6ea6903a..1df219c8ec4eab 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_15.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_15.yaml @@ -14,8 +14,8 @@ # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: - 12.4.13. [TC-CNET-4.15] [Wi-Fi] NetworkIDNotFound returned in - LastNetworkingStatus field validation [DUT-Server] + 12.4.13. [TC-CNET-4.15] [WiFi] NetworkIDNotFound value as + LastNetworkingStatus argument validation [DUT-Server] PICS: - CNET.S.F00 @@ -36,10 +36,10 @@ tests: disabled: true - label: - "TH sends ArmFailSafe command to the DUT with - the ExpiryLengthSeco nds field set to 900" + "TH sends ArmFailSafe command to the DUT with the ExpiryLengthSeconds + field set to 900" verification: | - ./chip-tool generalcommissioning arm-fail-safe 60 0 1 0 + ./chip-tool generalcommissioning arm-fail-safe 900 0 1 0 Verify "ArmFailSafeResponse" on the TH(Chip-tool) Log: diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_17.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_17.yaml index 7623a50e1e1237..4a8e255318fba6 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_17.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_17.yaml @@ -37,7 +37,7 @@ tests: disabled: true - label: "DUT reads the MaxNetworks attribute from the TH" - PICS: CNET.S.A0000 + PICS: CNET.C.A0000 verification: | ./chip-tool networkcommissioning read max-networks 1 0 @@ -114,7 +114,7 @@ tests: disabled: true - label: "DUT reads the Networks attribute from the TH" - PICS: CNET.S.A0001 + PICS: CNET.C.A0001 verification: | ./chip-tool networkcommissioning read networks 1 0 @@ -217,7 +217,7 @@ tests: disabled: true - label: "DUT reads ScanMaxTimeSeconds attribute from the TH" - PICS: CNET.S.A0002 + PICS: CNET.C.A0002 verification: | ./chip-tool networkcommissioning read scan-max-time-seconds 1 0 @@ -294,7 +294,7 @@ tests: disabled: true - label: "DUT reads ConnectMaxTimeSeconds attribute from the TH" - PICS: CNET.S.A0003 + PICS: CNET.C.A0003 verification: | ./chip-tool networkcommissioning read connect-max-time-seconds 1 0 @@ -372,7 +372,7 @@ tests: disabled: true - label: "DUT reads InterfaceEnabled attribute from the TH" - PICS: CNET.S.A0004 + PICS: CNET.C.A0004 verification: | ./chip-tool networkcommissioning read interface-enabled 1 0 @@ -448,7 +448,7 @@ tests: disabled: true - label: "DUT reads LastNetworkingStatus attribute from the TH" - PICS: CNET.S.A0005 + PICS: CNET.C.A0005 verification: | ./chip-tool networkcommissioning read last-networking-status 1 0 @@ -524,7 +524,7 @@ tests: disabled: true - label: "DUT reads LastNetworkID attribute from the TH" - PICS: CNET.S.A0006 + PICS: CNET.C.A0006 verification: | ./chip-tool networkcommissioning read last-network-id 1 0 @@ -599,7 +599,7 @@ tests: disabled: true - label: "DUT reads LastConnectErrorValue attribute from the TH" - PICS: CNET.S.A0007 + PICS: CNET.C.A0007 verification: | ./chip-tool networkcommissioning read last-connect-error-value 1 0 diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_18.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_18.yaml index 467a612b12de27..d3635d4a8d6f31 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_18.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_18.yaml @@ -37,7 +37,7 @@ tests: disabled: true - label: "DUT reads the MaxNetworks attribute from the TH" - PICS: CNET.S.A0000 + PICS: CNET.C.A0000 verification: | ./chip-tool networkcommissioning read max-networks 54 0 @@ -58,7 +58,7 @@ tests: disabled: true - label: "DUT reads the Networks attribute from the TH" - PICS: CNET.S.A0001 + PICS: CNET.C.A0001 verification: | ./chip-tool networkcommissioning read networks 54 0 @@ -78,7 +78,7 @@ tests: disabled: true - label: "DUT reads ScanMaxTimeSeconds attribute from the TH" - PICS: CNET.S.A0002 + PICS: CNET.C.A0002 verification: | ./chip-tool networkcommissioning read scan-max-time-seconds 54 0 @@ -96,7 +96,7 @@ tests: disabled: true - label: "DUT reads ConnectMaxTimeSeconds attribute from the TH" - PICS: CNET.S.A0003 + PICS: CNET.C.A0003 verification: | ./chip-tool networkcommissioning read connect-max-time-seconds 54 0 @@ -114,7 +114,7 @@ tests: disabled: true - label: "DUT reads InterfaceEnabled attribute from the TH" - PICS: CNET.S.A0004 + PICS: CNET.C.A0004 verification: | ./chip-tool networkcommissioning read interface-enabled 54 0 @@ -132,7 +132,7 @@ tests: disabled: true - label: "DUT reads LastNetworkingStatus attribute from the TH" - PICS: CNET.S.A0005 + PICS: CNET.C.A0005 verification: | ./chip-tool networkcommissioning read last-networking-status 54 0 @@ -153,7 +153,7 @@ tests: disabled: true - label: "DUT reads LastNetworkID attribute from the TH" - PICS: CNET.S.A0006 + PICS: CNET.C.A0006 verification: | ./chip-tool networkcommissioning read last-network-id 54 0 @@ -174,7 +174,7 @@ tests: disabled: true - label: "DUT reads LastConnectErrorValue attribute from the TH" - PICS: CNET.S.A0007 + PICS: CNET.C.A0007 verification: | ./chip-tool networkcommissioning read last-connect-error-value 54 0 diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_19.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_19.yaml index cff82bcb39efcd..c2f27a7da0bb41 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_19.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_19.yaml @@ -37,7 +37,7 @@ tests: disabled: true - label: "DUT reads the MaxNetworks attribute from the TH" - PICS: CNET.S.A0000 + PICS: CNET.C.A0000 verification: | ./chip-tool networkcommissioning read max-networks 1 0 @@ -114,7 +114,7 @@ tests: disabled: true - label: "DUT reads the Networks attribute from the TH" - PICS: CNET.S.A0001 + PICS: CNET.C.A0001 verification: | ./chip-tool networkcommissioning read networks 1 0 @@ -216,7 +216,7 @@ tests: disabled: true - label: "DUT reads InterfaceEnabled attribute from the TH" - PICS: CNET.S.A0004 + PICS: CNET.C.A0004 verification: | ./chip-tool networkcommissioning read interface-enabled 1 0 @@ -291,7 +291,7 @@ tests: disabled: true - label: "DUT reads LastNetworkingStatus attribute from the TH" - PICS: CNET.S.A0005 + PICS: CNET.C.A0005 verification: | ./chip-tool networkcommissioning read last-networking-status 1 0 @@ -366,7 +366,7 @@ tests: disabled: true - label: "DUT reads LastNetworkID attribute from the TH" - PICS: CNET.S.A0006 + PICS: CNET.C.A0006 verification: | ./chip-tool networkcommissioning read last-network-id 1 0 @@ -441,7 +441,7 @@ tests: disabled: true - label: "DUT reads LastConnectErrorValue attribute from the TH" - PICS: CNET.S.A0007 + PICS: CNET.C.A0007 verification: | ./chip-tool networkcommissioning read last-connect-error-value 1 0 diff --git a/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_10_5.yaml b/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_10_5.yaml index ff9eed762040cd..f5d728caa08758 100644 --- a/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_10_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_CONTENTLAUNCHER_10_5.yaml @@ -30,20 +30,22 @@ tests: PICS: CONTENTLAUNCHER.S.C01.Rsp 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 contentlauncher launch-url "exampleUrl" "{"providerName": "exampleName", "background": { "imageUrl": "exampleUrl", "color": "blue", "size" : {"width": 1.0, "height": 1.0, "metric": 0} }}" 1 1 - ./chip-tv-casting-app contentlauncher launch-url "exampleUrl" "{"providerName": "exampleName", "background": { "imageUrl": "exampleUrl", "color": "blue", "size" : {"width": 1.0, "height": 1.0, "metric": 0} }}" 1 1 + ./chip-tool contentlauncher launch-url "exampleUrl" '{"providerName": "exampleName", "background": { "color": "blue", "size" : {"width": 1.0, "height": 1.0, "metric": 0} }}' 1 1 + ./chip-tv-casting-app contentlauncher launch-url "exampleUrl" '{"providerName": "exampleName", "background": { "color": "blue", "size" : {"width": 1.0, "height": 1.0, "metric": 0} }}' 1 1 On TH verify the success response (value 0) received from DUT - [1651062947.426589][157354:157359] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_050A Command 0x0000_0002 - [1651062947.426633][157354:157359] CHIP:TOO: LaunchResponse: { - [1651062947.426667][157354:157359] CHIP:TOO: status: 0 - [1651062947.426686][157354:157359] CHIP:TOO: data: exampleData - [1651062947.426704][157354:157359] CHIP:TOO: } + [1678789736.472050][327646:327648] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_050A Command=0x0000_0002 + [1678789736.472076][327646:327648] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_050A Command 0x0000_0002 + [1678789736.472108][327646:327648] CHIP:TOO: LauncherResponse: { + [1678789736.472137][327646:327648] CHIP:TOO: status: 0 + [1678789736.472147][327646:327648] CHIP:TOO: data: exampleData + [1678789736.472156][327646:327648] CHIP:TOO: } + [1678789736.472184][327646:327648] CHIP:DMG: ICR moving to [AwaitingDe] Example tv-app log file shows receipt of launchurl command: - [1653934858083] [86784:7552970] CHIP: [ZCL] ContentLauncherManager::HandleLaunchUrl TEST CASE ContentURL=exampleUrl DisplayString= BrandingInformation.ProviderName=exampleName + [1678789736.471351][324821:324821] CHIP:ZCL: ContentLauncherManager::HandleLaunchUrl TEST CASE ContentURL=exampleUrl DisplayString= BrandingInformation.ProviderName=exampleName disabled: true - label: @@ -52,19 +54,25 @@ tests: PICS: CONTENTLAUNCHER.S.C01.Rsp 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 contentlauncher launch-url "https://csa-iot.org/" "{"providerName": "exampleName", "background": { "imageUrl": "exampleUrl", "color": "blue", "size" : {"width": 1.0, "height": 1.0, "metric": 0} }}" 1 1 --DisplayString "Custom Display String" - ./chip-tv-casting-app contentlauncher launch-url "https://csa-iot.org/" "{"providerName": "exampleName", "background": { "imageUrl": "exampleUrl", "color": "blue", "size" : {"width": 1.0, "height": 1.0, "metric": 0} }}" 1 1 --DisplayString "Custom Display String" + ./chip-tool contentlauncher launch-url "https://csa-iot.org/" '{"providerName": "exampleName", "background": {"color": "blue", "size" : {"width": 1.0, "height": 1.0, "metric": 0} }}' 1 1 --DisplayString "Custom Display String" + ./chip-tv-casting-app contentlauncher launch-url "https://csa-iot.org/" '{"providerName": "exampleName", "background": {"color": "blue", "size" : {"width": 1.0, "height": 1.0, "metric": 0} }}' 1 1 --DisplayString "Custom Display String" On TH verify the success response (value 0) received from DUT - [1651225659.477000][4263:4268] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_050A Command 0x0000_0002 - [1651225659.477112][4263:4268] CHIP:TOO: LaunchResponse: { - [1651225659.477213][4263:4268] CHIP:TOO: status: 0 - [1651225659.477274][4263:4268] CHIP:TOO: data: exampleData - [1651225659.477352][4263:4268] CHIP:TOO: } + [1678789892.544748][327789:327791] CHIP:DMG: }, + [1678789892.544778][327789:327791] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_050A Command=0x0000_0002 + [1678789892.544785][327789:327791] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_050A Command 0x0000_0002 + [1678789892.544800][327789:327791] CHIP:TOO: LauncherResponse: { + [1678789892.544806][327789:327791] CHIP:TOO: status: 0 + [1678789892.544809][327789:327791] CHIP:TOO: data: exampleData + [1678789892.544811][327789:327791] CHIP:TOO: } + [1678789892.544816][327789:327791] CHIP:DMG: ICR moving to [AwaitingDe] + [1678789892.544827][327789:327791] CHIP:EM: <<< [E:5462i S:11532 M:235261867 (Ack:223833241)] (S) Msg TX to 1:0000000000000001 [67DC] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1678789892.544831][327789:327791] CHIP:IN: (S) Sending msg 235261867 on secure session with LSID: 11532 + Example tv-app log file shows receipt of launchurl command: - [1653935303371] [86784:7557521] CHIP: [ZCL] ContentLauncherManager::HandleLaunchUrl TEST CASE ContentURL=https://csa-iot.org/ DisplayString=Custom Display String BrandingInformation.ProviderName=exampleName + [1678789892.544284][324821:324821] CHIP:ZCL: ContentLauncherManager::HandleLaunchUrl TEST CASE ContentURL=https://csa-iot.org/ DisplayString=Custom Display String BrandingInformation.ProviderName=exampleName disabled: true - label: @@ -73,19 +81,22 @@ tests: PICS: CONTENTLAUNCHER.S.C01.Rsp 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 contentlauncher launch-url "https://csa-iot.org/" "{"providerName": "exampleName", "background": { "imageUrl": "exampleUrl", "color": "blue", "size" : {"width": 1.0, "height": 1.0, "metric": 0} }}" 1 1 - ./chip-tv-casting-app contentlauncher launch-url "https://csa-iot.org/" "{"providerName": "exampleName", "background": { "imageUrl": "exampleUrl", "color": "blue", "size" : {"width": 1.0, "height": 1.0, "metric": 0} }}" 1 1 + ./chip-tool contentlauncher launch-url "https://csa-iot.org/" '{"providerName": "exampleName", "background": {"color": "blue", "size" : {"width": 1.0, "height": 1.0, "metric": 0} }}' 1 1 + ./chip-tv-casting-app contentlauncher launch-url "https://csa-iot.org/" '{"providerName": "exampleName", "background": { "color": "blue", "size" : {"width": 1.0, "height": 1.0, "metric": 0} }}' 1 1 On TH verify the success response (value 0) received from DUT - [1651225659.477000][4263:4268] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_050A Command 0x0000_0002 - [1651225659.477112][4263:4268] CHIP:TOO: LaunchResponse: { - [1651225659.477213][4263:4268] CHIP:TOO: status: 0 - [1651225659.477274][4263:4268] CHIP:TOO: data: exampleData - [1651225659.477352][4263:4268] CHIP:TOO: } + [1678789976.395074][327809:327811] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_050A Command=0x0000_0002 + [1678789976.395083][327809:327811] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_050A Command 0x0000_0002 + [1678789976.395095][327809:327811] CHIP:TOO: LauncherResponse: { + [1678789976.395106][327809:327811] CHIP:TOO: status: 0 + [1678789976.395109][327809:327811] CHIP:TOO: data: exampleData + [1678789976.395112][327809:327811] CHIP:TOO: } + [1678789976.395120][327809:327811] CHIP:DMG: ICR moving to [AwaitingDe] + Example tv-app log file shows receipt of launchurl command: - [1653935043782] [86784:7554997] CHIP: [ZCL] ContentLauncherManager::HandleLaunchUrl TEST CASE ContentURL=https://csa-iot.org/ DisplayString= BrandingInformation.ProviderName=exampleName + [1678789976.394509][324821:324821] CHIP:ZCL: ContentLauncherManager::HandleLaunchUrl TEST CASE ContentURL=https://csa-iot.org/ DisplayString= BrandingInformation.ProviderName=exampleName disabled: true - label: @@ -94,22 +105,24 @@ tests: PICS: CONTENTLAUNCHER.S.C01.Rsp 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 contentlauncher launch-url "https://badurl" "{"providerName": "exampleName", "background": { "imageUrl": "exampleUrl", "color": "blue", "size" : {"width": 1.0, "height": 1.0, "metric": 0} }}" 1 1 - ./chip-tv-casting-app contentlauncher launch-url "https://badurl" "{"providerName": "exampleName", "background": { "imageUrl": "exampleUrl", "color": "blue", "size" : {"width": 1.0, "height": 1.0, "metric": 0} }}" 1 1 + ./chip-tool contentlauncher launch-url "https://badurl" '{"providerName": "exampleName", "background": { "color": "blue", "size" : {"width": 1.0, "height": 1.0, "metric": 0} }}' 1 1 + ./chip-tv-casting-app contentlauncher launch-url "https://badurl" '{"providerName": "exampleName", "background": {"color": "blue", "size" : {"width": 1.0, "height": 1.0, "metric": 0} }}' 1 1 On TH verify the success response (value 0) received from DUT - [1652429829.721244][29660:29665] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_050A Command 0x0000_0002 - [1652429829.721301][29660:29665] CHIP:TOO: LaunchResponse: { - [1652429829.721341][29660:29665] CHIP:TOO: status: 1 - [1652429829.721368][29660:29665] CHIP:TOO: data: exampleData - [1652429829.721395][29660:29665] CHIP:TOO: } - - [1654584050.322782][2478:2478] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_050A Command=0x0000_0001 - [1654584050.322837][2478:2478] CHIP:DL: GetContentAppByEndpointId() - endpoint 1 not found - [1654584050.322860][2478:2478] CHIP:ZCL: Content Launcher NOT returning ContentApp delegate for endpoint:1 - [1654584050.322891][2478:2478] CHIP:ZCL: ContentLauncherManager::HandleLaunchUrl - [1654584050.322915][2478:2478] CHIP:ZCL: ContentLauncherManager::HandleLaunchUrl TEST CASE ContentURL=https://badurl DisplayString= BrandingInformation.ProviderName=exampleName - [1654584050.322953][2478:2478] CHIP:DMG: ICR moving to [ Preparing] + [1678790057.261934][327869:327871] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_050A Command=0x0000_0002 + [1678790057.261963][327869:327871] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_050A Command 0x0000_0002 + [1678790057.261997][327869:327871] CHIP:TOO: LauncherResponse: { + [1678790057.262025][327869:327871] CHIP:TOO: status: 1 + [1678790057.262035][327869:327871] CHIP:TOO: data: exampleData + [1678790057.262045][327869:327871] CHIP:TOO: } + [1678790057.262072][327869:327871] CHIP:DMG: ICR moving to [AwaitingDe] + [1678790057.262115][327869:327871] CHIP:EM: <<< [E:61104i S:23930 M:82030218 (Ack:133196816)] (S) Msg TX to 1:0000000000000001 [67DC] --- Type 0000:10 (SecureChannel:StandaloneAck) + + Example tv-app log file shows receipt of launchurl command: + [1678790092.751184][324821:324821] CHIP:ZCL: Content Launcher NOT returning ContentApp delegate for endpoint:1 + [1678790092.751199][324821:324821] CHIP:ZCL: ContentLauncherManager::HandleLaunchUrl + [1678790092.751206][324821:324821] CHIP:ZCL: ContentLauncherManager::HandleLaunchUrl TEST CASE ContentURL=https://badurl DisplayString= BrandingInformation.ProviderName=exampleName + [1678790092.751223][324821:324821] CHIP:DMG: Command handler moving to [ Preparing] disabled: true - label: @@ -118,20 +131,26 @@ tests: PICS: CONTENTLAUNCHER.S.C01.Rsp 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 contentlauncher launch-url "https://csa-iot.org/badauth" "{"providerName": "exampleName", "background": { "imageUrl": "exampleUrl", "color": "blue", "size" : {"width": 1.0, "height": 1.0, "metric": 0} }}" 1 1 - ./chip-tv-casting-app contentlauncher launch-url "https://csa-iot.org/badauth" "{"providerName": "exampleName", "background": { "imageUrl": "exampleUrl", "color": "blue", "size" : {"width": 1.0, "height": 1.0, "metric": 0} }}" 1 1 + ./chip-tool contentlauncher launch-url "https://csa-iot.org/badauth" '{"providerName": "exampleName", "background": {"color": "blue", "size" : {"width": 1.0, "height": 1.0, "metric": 0} }}' 1 1 + ./chip-tv-casting-app contentlauncher launch-url "https://csa-iot.org/badauth" '{"providerName": "exampleName", "background": { "color": "blue", "size" : {"width": 1.0, "height": 1.0, "metric": 0} }}' 1 1 On TH verify the success response (value 0) received from DUT - [1652429857.017897][29666:29671] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_050A Command 0x0000_0002 - [1652429857.017968][29666:29671] CHIP:TOO: LaunchResponse: { - [1652429857.018031][29666:29671] CHIP:TOO: status: 2 - [1652429857.018068][29666:29671] CHIP:TOO: data: exampleData - [1652429857.018103][29666:29671] CHIP:TOO: } - - [1654584216.621632][2478:2478] CHIP:DMG: Received command for Endpoint=1 Cluster=0x0000_050A Command=0x0000_0001 - [1654584216.621692][2478:2478] CHIP:DL: GetContentAppByEndpointId() - endpoint 1 not found - [1654584216.621718][2478:2478] CHIP:ZCL: Content Launcher NOT returning ContentApp delegate for endpoint:1 - [1654584216.621752][2478:2478] CHIP:ZCL: ContentLauncherManager::HandleLaunchUrl - [1654584216.621804][2478:2478] CHIP:ZCL: ContentLauncherManager::HandleLaunchUrl TEST CASE ContentURL=https://csa-iot.org/badauth DisplayString= BrandingInformation.ProviderName=exampleName - [1654584216.621845][2478:2478] CHIP:DMG: ICR moving to [ Preparing] + [1678790163.014868][327910:327912] CHIP:DMG: }, + [1678790163.014878][327910:327912] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_050A Command=0x0000_0002 + [1678790163.014885][327910:327912] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_050A Command 0x0000_0002 + [1678790163.014894][327910:327912] CHIP:TOO: LauncherResponse: { + [1678790163.014903][327910:327912] CHIP:TOO: status: 2 + [1678790163.014905][327910:327912] CHIP:TOO: data: exampleData + [1678790163.014908][327910:327912] CHIP:TOO: } + [1678790163.014912][327910:327912] CHIP:DMG: ICR moving to [AwaitingDe] + [1678790163.014926][327910:327912] CHIP:EM: <<< [E:6864i S:36983 M:190033825 (Ack:105150405)] (S) Msg TX to 1:0000000000000001 [67DC] --- Type 0000:10 (SecureChannel:StandaloneAck) + [1678790163.014930][327910:327912] CHIP:IN: (S) Sending msg 190033825 on secure session with LSID: 36983 + + + Example tv-app log file shows receipt of launchurl command: + [1678790163.014705][324821:324821] CHIP:DL: GetContentAppByEndpointId() - endpoint 1 not found + [1678790163.014707][324821:324821] CHIP:ZCL: Content Launcher NOT returning ContentApp delegate for endpoint:1 + [1678790163.014711][324821:324821] CHIP:ZCL: ContentLauncherManager::HandleLaunchUrl + [1678790163.014713][324821:324821] CHIP:ZCL: ContentLauncherManager::HandleLaunchUrl TEST CASE ContentURL=https://csa-iot.org/badauth DisplayString= BrandingInformation.ProviderName=exampleName + [1678790163.014719][324821:324821] CHIP:DMG: Command handler moving to [ Preparing] disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DA_1_2.yaml b/src/app/tests/suites/certification/Test_TC_DA_1_2.yaml index 5182e56c7430e6..419277d04f4fde 100644 --- a/src/app/tests/suites/certification/Test_TC_DA_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DA_1_2.yaml @@ -35,7 +35,7 @@ tests: verification: | To generate the Attestation Nonce give below command - echo hex:$(hexdump -vn32 -e"4/4 "%08X" " /dev/urandom) + echo hex:$(hexdump -vn32 -e'4/4 "%08X"' /dev/urandom) The generated Attestation Nonce is hex:97B823C0207728BEC509CFE4D413C95AA693140D1F5D60215913ABB1F220E631 disabled: true @@ -303,7 +303,7 @@ tests: AttestationResponse Command received by TH1 from DUT" verification: | To get attestation nonce give below command - echo hex:$(hexdump -vn32 -e"4/4 "%08X" " /dev/urandom) + echo hex:$(hexdump -vn32 -e'4/4 "%08X"' /dev/urandom) ./chip-tool operationalcredentials attestation-request hex:3577CA6EFFFC560E287604663AE5BE2F11D1B1CF99BE326AF5B3B114A2E91395 1 0 --trace_decode 1 diff --git a/src/app/tests/suites/certification/Test_TC_DA_1_4.yaml b/src/app/tests/suites/certification/Test_TC_DA_1_4.yaml index bb3520a932d85e..686ea04a00f784 100644 --- a/src/app/tests/suites/certification/Test_TC_DA_1_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_DA_1_4.yaml @@ -138,12 +138,12 @@ tests: [1662449060.841080][31013:31018] CHIP:DMG: }, [1662449060.841088][31013:31018] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0001 [1662449060.841093][31013:31018] CHIP:CTL: Received Attestation Information from the device - [1662449060.841103][31013:31018] CHIP:CTL: Successfully finished commissioning step "SendAttestationRequest" - [1662449060.841111][31013:31018] CHIP:CTL: Commissioning stage next step: "SendAttestationRequest" -> "AttestationVerification" - [1662449060.841115][31013:31018] CHIP:CTL: Performing next commissioning step "AttestationVerification" + [1662449060.841103][31013:31018] CHIP:CTL: Successfully finished commissioning step 'SendAttestationRequest' + [1662449060.841111][31013:31018] CHIP:CTL: Commissioning stage next step: 'SendAttestationRequest' -> 'AttestationVerification' + [1662449060.841115][31013:31018] CHIP:CTL: Performing next commissioning step 'AttestationVerification' [1662449060.841117][31013:31018] CHIP:CTL: Verifying attestation - [1662449060.841974][31013:31018] CHIP:CTL: Successfully validated "Attestation Information" command received from the device. - [1662449060.841981][31013:31018] CHIP:CTL: Successfully finished commissioning step "AttestationVerification" + [1662449060.841974][31013:31018] CHIP:CTL: Successfully validated 'Attestation Information' command received from the device. + [1662449060.841981][31013:31018] CHIP:CTL: Successfully finished commissioning step 'AttestationVerification' disabled: true - label: @@ -188,20 +188,20 @@ tests: ./chip-all-clusters-app --trace_decode 1 Once TH(all-clusters-app) reach the commissionable state pls send below mentioned command on DUT(chip-tool). Pls use equivalent command on the respective platform - ./chip-tool pairing onnetwork 1 20202021 --trace_decode 1 --paa-trust-store-path ~/Aug30_cntr/connectedhomeip/credentials/development/attestation + ./chip-tool pairing onnetwork 1 20202021 --trace_decode 1 --paa-trust-store-path ~/connectedhomeip/credentials/development/attestation If the DUT(chip-tool) has to provision to verify the logs:- verify the below mentioned same behaviour log on the DUT (chip-tool): [1662455580.725445][31980:31985] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0001 [1662455580.725450][31980:31985] CHIP:CTL: Received Attestation Information from the device - [1662455580.725454][31980:31985] CHIP:CTL: Successfully finished commissioning step "SendAttestationRequest" - [1662455580.725461][31980:31985] CHIP:CTL: Commissioning stage next step: "SendAttestationRequest" -> "AttestationVerification" - [1662455580.725465][31980:31985] CHIP:CTL: Performing next commissioning step "AttestationVerification" + [1662455580.725454][31980:31985] CHIP:CTL: Successfully finished commissioning step 'SendAttestationRequest' + [1662455580.725461][31980:31985] CHIP:CTL: Commissioning stage next step: 'SendAttestationRequest' -> 'AttestationVerification' + [1662455580.725465][31980:31985] CHIP:CTL: Performing next commissioning step 'AttestationVerification' [1662455580.725468][31980:31985] CHIP:CTL: Verifying attestation - [1662455580.725944][31980:31985] CHIP:CTL: Failed in verifying "Attestation Information" command received from the device: err 101. Look at AttestationVerificationResult enum to understand the errors - [1662455580.725956][31980:31985] CHIP:CTL: Error on commissioning step "AttestationVerification": "../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1027: CHIP Error 0x000000AC: Internal error" + [1662455580.725944][31980:31985] CHIP:CTL: Failed in verifying 'Attestation Information' command received from the device: err 101. Look at AttestationVerificationResult enum to understand the errors + [1662455580.725956][31980:31985] CHIP:CTL: Error on commissioning step 'AttestationVerification': '../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1027: CHIP Error 0x000000AC: Internal error' [1662455580.725958][31980:31985] CHIP:CTL: Failed to perform commissioning step 8 - [1662455580.725961][31980:31985] CHIP:CTL: Going from commissioning step "AttestationVerification" with lastErr = "../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1027: CHIP Error 0x000000AC: Internal error" -> "Cleanup" - [1662455580.725966][31980:31985] CHIP:CTL: Performing next commissioning step "Cleanup" with completion status = "../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1027: CHIP Error 0x000000AC: Internal error" + [1662455580.725961][31980:31985] CHIP:CTL: Going from commissioning step 'AttestationVerification' with lastErr = '../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1027: CHIP Error 0x000000AC: Internal error' -> 'Cleanup' + [1662455580.725966][31980:31985] CHIP:CTL: Performing next commissioning step 'Cleanup' with completion status = '../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1027: CHIP Error 0x000000AC: Internal error' [1662455580.725979][31980:31985] CHIP:CTL: Expiring failsafe on proxy 0x7fe3b40236a0 @@ -214,23 +214,23 @@ tests: execute the below mentioned command to put TH(all-cluster-app) into a commissionable state, Pls use equivalent command on the respective Platform - ./chip-all-clusters-app --trace_decode 1 --dac_provider ~/Aug30_cntr/connectedhomeip/credentials/development/commissioner_dut/struct_dac_sig_algo_ecdsa_with_sha1/test_case_vector.json + ./chip-all-clusters-app --trace_decode 1 --dac_provider ~/connectedhomeip/credentials/development/commissioner_dut/struct_dac_sig_algo_ecdsa_with_sha1/test_case_vector.json Once TH(all-clusters-app) reach the commissionable state pls send below mentioned command on DUT(chip-tool). Pls use equivalent command on the respective platform - ./chip-tool pairing onnetwork 1 20202021 --trace_decode 1 + ./chip-tool pairing onnetwork 1 20202021 --trace_decode 1 If the DUT(chip-tool) has to provision to verify the logs:- verify the below mentioned same behaviour log on the DUT (chip-tool): [1662456484.492166][32193:32198] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0001 [1662456484.492170][32193:32198] CHIP:CTL: Received Attestation Information from the device - [1662456484.492173][32193:32198] CHIP:CTL: Successfully finished commissioning step "SendAttestationRequest" - [1662456484.492179][32193:32198] CHIP:CTL: Commissioning stage next step: "SendAttestationRequest" -> "AttestationVerification" - [1662456484.492181][32193:32198] CHIP:CTL: Performing next commissioning step "AttestationVerification" + [1662456484.492173][32193:32198] CHIP:CTL: Successfully finished commissioning step 'SendAttestationRequest' + [1662456484.492179][32193:32198] CHIP:CTL: Commissioning stage next step: 'SendAttestationRequest' -> 'AttestationVerification' + [1662456484.492181][32193:32198] CHIP:CTL: Performing next commissioning step 'AttestationVerification' [1662456484.492183][32193:32198] CHIP:CTL: Verifying attestation - [1662456484.492990][32193:32198] CHIP:CTL: Failed in verifying "Attestation Information" command received from the device: err 605. Look at AttestationVerificationResult enum to understand the errors - [1662456484.493000][32193:32198] CHIP:CTL: Error on commissioning step "AttestationVerification": "../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1027: CHIP Error 0x000000AC: Internal error" + [1662456484.492990][32193:32198] CHIP:CTL: Failed in verifying 'Attestation Information' command received from the device: err 605. Look at AttestationVerificationResult enum to understand the errors + [1662456484.493000][32193:32198] CHIP:CTL: Error on commissioning step 'AttestationVerification': '../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1027: CHIP Error 0x000000AC: Internal error' [1662456484.493005][32193:32198] CHIP:CTL: Failed to perform commissioning step 8 - [1662456484.493007][32193:32198] CHIP:CTL: Going from commissioning step "AttestationVerification" with lastErr = "../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1027: CHIP Error 0x000000AC: Internal error" -> "Cleanup" - [1662456484.493011][32193:32198] CHIP:CTL: Performing next commissioning step "Cleanup" with completion status = "../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1027: CHIP Error 0x000000AC: Internal error" + [1662456484.493007][32193:32198] CHIP:CTL: Going from commissioning step 'AttestationVerification' with lastErr = '../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1027: CHIP Error 0x000000AC: Internal error' -> 'Cleanup' + [1662456484.493011][32193:32198] CHIP:CTL: Performing next commissioning step 'Cleanup' with completion status = '../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1027: CHIP Error 0x000000AC: Internal error' [1662456484.493013][32193:32198] CHIP:CTL: Expiring failsafe on proxy 0x7fd0a40236a0 [1662456484.493022][32193:32198] CHIP:DMG: ICR moving to [AddingComm] [1662456484.493026][32193:32198] CHIP:DMG: ICR moving to [AddedComma] @@ -245,30 +245,30 @@ tests: 3. Similarly for condition 3 Commissionee provides DAC with validity period that is not in range of PAA/PAI follow below steps Commissionee provides DAC with validity period that is not in range of PAA/PAI - Use the folder - connectedhomeip/credentials/development/commissioner_dut/struct_dac_valid_in_past & use the sample json test_case_vector.json + Use the folder - connectedhomeip/credentials/development/commissioner_dut/struct_dac_valid_in_past & use the sample json test_case_vector.json Commission TH to DUT by using --dac_provider parameter execute the below mentioned command to put TH(all-cluster-app) into a commissionable state, Pls use equivalent command on the respective Platform - ./chip-all-clusters-app --trace_decode 1 --dac_provider ~/Aug30_cntr/connectedhomeip/credentials/development/commissioner_dut/struct_dac_valid_in_past/test_case_vector.json + ./chip-all-clusters-app --trace_decode 1 --dac_provider ~/connectedhomeip/credentials/development/commissioner_dut/struct_dac_valid_in_past/test_case_vector.json Once TH(all-clusters-app) reach the commissionable state pls send below mentioned command on DUT(chip-tool). Pls use equivalent command on the respective platform - ./chip-tool pairing onnetwork 1 20202021 --trace_decode 1 + ./chip-tool pairing onnetwork 1 20202021 --trace_decode 1 If the DUT(chip-tool) has to provision to verify the logs:- verify the below mentioned same behaviour log on the DUT (chip-tool): [1662459474.547436][32792:32797] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0001 [1662459474.547441][32792:32797] CHIP:CTL: Received Attestation Information from the device - [1662459474.547445][32792:32797] CHIP:CTL: Successfully finished commissioning step "SendAttestationRequest" - [1662459474.547452][32792:32797] CHIP:CTL: Commissioning stage next step: "SendAttestationRequest" -> "AttestationVerification" - [1662459474.547456][32792:32797] CHIP:CTL: Performing next commissioning step "AttestationVerification" + [1662459474.547445][32792:32797] CHIP:CTL: Successfully finished commissioning step 'SendAttestationRequest' + [1662459474.547452][32792:32797] CHIP:CTL: Commissioning stage next step: 'SendAttestationRequest' -> 'AttestationVerification' + [1662459474.547456][32792:32797] CHIP:CTL: Performing next commissioning step 'AttestationVerification' [1662459474.547458][32792:32797] CHIP:CTL: Verifying attestation - [1662459474.548034][32792:32797] CHIP:CTL: Failed in verifying "Attestation Information" command received from the device: err 301. Look at AttestationVerificationResult enum to understand the errors - [1662459474.548043][32792:32797] CHIP:CTL: Error on commissioning step "AttestationVerification": "../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1027: CHIP Error 0x000000AC: Internal error" + [1662459474.548034][32792:32797] CHIP:CTL: Failed in verifying 'Attestation Information' command received from the device: err 301. Look at AttestationVerificationResult enum to understand the errors + [1662459474.548043][32792:32797] CHIP:CTL: Error on commissioning step 'AttestationVerification': '../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1027: CHIP Error 0x000000AC: Internal error' [1662459474.548047][32792:32797] CHIP:CTL: Failed to perform commissioning step 8 - [1662459474.548051][32792:32797] CHIP:CTL: Going from commissioning step "AttestationVerification" with lastErr = "../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1027: CHIP Error 0x000000AC: Internal error" -> "Cleanup" - [1662459474.548055][32792:32797] CHIP:CTL: Performing next commissioning step "Cleanup" with completion status = "../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1027: CHIP Error 0x000000AC: Internal error" + [1662459474.548051][32792:32797] CHIP:CTL: Going from commissioning step 'AttestationVerification' with lastErr = '../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1027: CHIP Error 0x000000AC: Internal error' -> 'Cleanup' + [1662459474.548055][32792:32797] CHIP:CTL: Performing next commissioning step 'Cleanup' with completion status = '../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1027: CHIP Error 0x000000AC: Internal error' [1662459474.548059][32792:32797] CHIP:CTL: Expiring failsafe on proxy 0x7f71200236a0 [1662459474.548073][32792:32797] CHIP:DMG: ICR moving to [AddingComm] [1662459474.548077][32792:32797] CHIP:DMG: ICR moving to [AddedComma] @@ -295,7 +295,7 @@ tests: Use the appropriate folder to test different scenarios. execute the below mentioned command to put TH(all-cluster-app) into a commissionable state, Pls use equivalent command on the respective Platform - ./chip-all-clusters-app --trace_decode 1 --dac_provider ~/Aug30_cntr/connectedhomeip/credentials/development/commissioner_dut/struct_cd_dac_origin_vid_missing_pid_present/test_case_vector.json + ./chip-all-clusters-app --trace_decode 1 --dac_provider ~/connectedhomeip/credentials/development/commissioner_dut/struct_cd_dac_origin_vid_missing_pid_present/test_case_vector.json Once TH(all-clusters-app) reach the commissionable state pls send below mentioned command on DUT(chip-tool). Pls use equivalent command on the respective platform ./chip-tool pairing onnetwork 1 20202021 --trace_decode 1 @@ -303,15 +303,15 @@ tests: If the DUT(chip-tool) has to provision to verify the logs:- verify the below mentioned same behaviour log on the DUT (chip-tool): [1662459904.540345][32873:32878] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0001 [1662459904.540349][32873:32878] CHIP:CTL: Received Attestation Information from the device - [1662459904.540352][32873:32878] CHIP:CTL: Successfully finished commissioning step "SendAttestationRequest" - [1662459904.540358][32873:32878] CHIP:CTL: Commissioning stage next step: "SendAttestationRequest" -> "AttestationVerification" - [1662459904.540361][32873:32878] CHIP:CTL: Performing next commissioning step "AttestationVerification" + [1662459904.540352][32873:32878] CHIP:CTL: Successfully finished commissioning step 'SendAttestationRequest' + [1662459904.540358][32873:32878] CHIP:CTL: Commissioning stage next step: 'SendAttestationRequest' -> 'AttestationVerification' + [1662459904.540361][32873:32878] CHIP:CTL: Performing next commissioning step 'AttestationVerification' [1662459904.540363][32873:32878] CHIP:CTL: Verifying attestation - [1662459904.541210][32873:32878] CHIP:CTL: Failed in verifying "Attestation Information" command received from the device: err 603. Look at AttestationVerificationResult enum to understand the errors - [1662459904.541219][32873:32878] CHIP:CTL: Error on commissioning step "AttestationVerification": "../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1027: CHIP Error 0x000000AC: Internal error" + [1662459904.541210][32873:32878] CHIP:CTL: Failed in verifying 'Attestation Information' command received from the device: err 603. Look at AttestationVerificationResult enum to understand the errors + [1662459904.541219][32873:32878] CHIP:CTL: Error on commissioning step 'AttestationVerification': '../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1027: CHIP Error 0x000000AC: Internal error' [1662459904.541221][32873:32878] CHIP:CTL: Failed to perform commissioning step 8 - [1662459904.541223][32873:32878] CHIP:CTL: Going from commissioning step "AttestationVerification" with lastErr = "../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1027: CHIP Error 0x000000AC: Internal error" -> "Cleanup" - [1662459904.541229][32873:32878] CHIP:CTL: Performing next commissioning step "Cleanup" with completion status = "../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1027: CHIP Error 0x000000AC: Internal error" + [1662459904.541223][32873:32878] CHIP:CTL: Going from commissioning step 'AttestationVerification' with lastErr = '../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1027: CHIP Error 0x000000AC: Internal error' -> 'Cleanup' + [1662459904.541229][32873:32878] CHIP:CTL: Performing next commissioning step 'Cleanup' with completion status = '../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1027: CHIP Error 0x000000AC: Internal error' [1662459904.541231][32873:32878] CHIP:CTL: Expiring failsafe on proxy 0x7f1b8c023460 [1662459904.541240][32873:32878] CHIP:DMG: ICR moving to [AddingComm] [1662459904.541244][32873:32878] CHIP:DMG: ICR moving to [AddedComma] @@ -331,22 +331,22 @@ tests: & use the sample json test_case_vector.json execute the below mentioned command to put TH(all-cluster-app) into a commissionable state, Pls use equivalent command on the respective Platform - ./chip-all-clusters-app --trace_decode 1 --dac_provider ~/Aug30_cntr/connectedhomeip/credentials/development/commissioner_dut/struct_cd_vid_mismatch/test_case_vector.json + ./chip-all-clusters-app --trace_decode 1 --dac_provider ~/connectedhomeip/credentials/development/commissioner_dut/struct_cd_vid_mismatch/test_case_vector.json Once TH(all-clusters-app) reach the commissionable state pls send below mentioned command on DUT(chip-tool). Pls use equivalent command on the respective platform ./chip-tool pairing onnetwork 1 20202021 --trace_decode 1 If the DUT(chip-tool) has to provision to verify the logs:- verify the below mentioned same behaviour log on the DUT (chip-tool): [1662460172.864493][32929:32934] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0001 [1662460172.864502][32929:32934] CHIP:CTL: Received Attestation Information from the device - [1662460172.864510][32929:32934] CHIP:CTL: Successfully finished commissioning step "SendAttestationRequest" - [1662460172.864522][32929:32934] CHIP:CTL: Commissioning stage next step: "SendAttestationRequest" -> "AttestationVerification" - [1662460172.864526][32929:32934] CHIP:CTL: Performing next commissioning step "AttestationVerification" + [1662460172.864510][32929:32934] CHIP:CTL: Successfully finished commissioning step 'SendAttestationRequest' + [1662460172.864522][32929:32934] CHIP:CTL: Commissioning stage next step: 'SendAttestationRequest' -> 'AttestationVerification' + [1662460172.864526][32929:32934] CHIP:CTL: Performing next commissioning step 'AttestationVerification' [1662460172.864528][32929:32934] CHIP:CTL: Verifying attestation - [1662460172.865422][32929:32934] CHIP:CTL: Failed in verifying "Attestation Information" command received from the device: err 603. Look at AttestationVerificationResult enum to understand the errors - [1662460172.865435][32929:32934] CHIP:CTL: Error on commissioning step "AttestationVerification": "../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1027: CHIP Error 0x000000AC: Internal error" + [1662460172.865422][32929:32934] CHIP:CTL: Failed in verifying 'Attestation Information' command received from the device: err 603. Look at AttestationVerificationResult enum to understand the errors + [1662460172.865435][32929:32934] CHIP:CTL: Error on commissioning step 'AttestationVerification': '../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1027: CHIP Error 0x000000AC: Internal error' [1662460172.865439][32929:32934] CHIP:CTL: Failed to perform commissioning step 8 - [1662460172.865442][32929:32934] CHIP:CTL: Going from commissioning step "AttestationVerification" with lastErr = "../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1027: CHIP Error 0x000000AC: Internal error" -> "Cleanup" - [1662460172.865447][32929:32934] CHIP:CTL: Performing next commissioning step "Cleanup" with completion status = "../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1027: CHIP Error 0x000000AC: Internal error" + [1662460172.865442][32929:32934] CHIP:CTL: Going from commissioning step 'AttestationVerification' with lastErr = '../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1027: CHIP Error 0x000000AC: Internal error' -> 'Cleanup' + [1662460172.865447][32929:32934] CHIP:CTL: Performing next commissioning step 'Cleanup' with completion status = '../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1027: CHIP Error 0x000000AC: Internal error' [1662460172.865449][32929:32934] CHIP:CTL: Expiring failsafe on proxy 0x7fa380023460 @@ -361,21 +361,21 @@ tests: & use the sample json test_case_vector.json execute the below mentioned command to put TH(all-cluster-app) into a commissionable state, Pls use equivalent command on the respective Platform - ./chip-all-clusters-app --trace_decode 1 --dac_provider ~/Aug30_cntr/connectedhomeip/credentials/development/commissioner_dut/struct_cd_vid_mismatch/test_case_vector.json + ./chip-all-clusters-app --trace_decode 1 --dac_provider ~/connectedhomeip/credentials/development/commissioner_dut/struct_cd_vid_mismatch/test_case_vector.json Once TH(all-clusters-app) reach the commissionable state pls send below mentioned command on DUT(chip-tool). Pls use equivalent command on the respective platform ./chip-tool pairing onnetwork 1 20202021 --trace_decode 1 If the DUT(chip-tool) has to provision to verify the logs:- verify the below mentioned same behaviour log on the DUT (chip-tool): [1662460606.271896][33030:33035] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0001 [1662460606.271904][33030:33035] CHIP:CTL: Received Attestation Information from the device - [1662460606.271914][33030:33035] CHIP:CTL: Successfully finished commissioning step "SendAttestationRequest" - [1662460606.271930][33030:33035] CHIP:CTL: Commissioning stage next step: "SendAttestationRequest" -> "AttestationVerification" - [1662460606.271938][33030:33035] CHIP:CTL: Performing next commissioning step "AttestationVerification" + [1662460606.271914][33030:33035] CHIP:CTL: Successfully finished commissioning step 'SendAttestationRequest' + [1662460606.271930][33030:33035] CHIP:CTL: Commissioning stage next step: 'SendAttestationRequest' -> 'AttestationVerification' + [1662460606.271938][33030:33035] CHIP:CTL: Performing next commissioning step 'AttestationVerification' [1662460606.271942][33030:33035] CHIP:CTL: Verifying attestation - [1662460606.272912][33030:33035] CHIP:CTL: Failed in verifying "Attestation Information" command received from the device: err 603. Look at AttestationVerificationResult enum to understand the errors - [1662460606.272924][33030:33035] CHIP:CTL: Error on commissioning step "AttestationVerification": "../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1027: CHIP Error 0x000000AC: Internal error" + [1662460606.272912][33030:33035] CHIP:CTL: Failed in verifying 'Attestation Information' command received from the device: err 603. Look at AttestationVerificationResult enum to understand the errors + [1662460606.272924][33030:33035] CHIP:CTL: Error on commissioning step 'AttestationVerification': '../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1027: CHIP Error 0x000000AC: Internal error' [1662460606.272927][33030:33035] CHIP:CTL: Failed to perform commissioning step 8 - [1662460606.272932][33030:33035] CHIP:CTL: Going from commissioning step "AttestationVerification" with lastErr = "../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1027: CHIP Error 0x000000AC: Internal error" -> "Cleanup" + [1662460606.272932][33030:33035] CHIP:CTL: Going from commissioning step 'AttestationVerification' with lastErr = '../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1027: CHIP Error 0x000000AC: Internal error' -> 'Cleanup' @@ -391,16 +391,16 @@ tests: Commission TH to DUT by using --dac_provider parameter execute the below mentioned command to put TH(all-cluster-app) into a commissionable state, Pls use equivalent command on the respective Platform - ./chip-all-clusters-app --trace_decode 1 --dac_provider ~/Aug30_cntr/connectedhomeip/credentials/development/commissioner_dut/struct_cd_pid_array_count10_mismatch/test_case_vector.json + ./chip-all-clusters-app --trace_decode 1 --dac_provider ~/connectedhomeip/credentials/development/commissioner_dut/struct_cd_pid_array_count10_mismatch/test_case_vector.json Once TH(all-clusters-app) reach the commissionable state pls send below mentioned command on DUT(chip-tool). Pls use equivalent command on the respective platform ./chip-tool pairing onnetwork 1 20202021 --trace_decode 1 If the DUT(chip-tool) has to provision to verify the logs:- verify the below mentioned same behaviour log on the DUT (chip-tool): - [1662460943.774883][33107:33112] CHIP:CTL: Commissioning stage next step: "SendAttestationRequest" -> "AttestationVerification" - [1662460943.774887][33107:33112] CHIP:CTL: Performing next commissioning step "AttestationVerification" + [1662460943.774883][33107:33112] CHIP:CTL: Commissioning stage next step: 'SendAttestationRequest' -> 'AttestationVerification' + [1662460943.774887][33107:33112] CHIP:CTL: Performing next commissioning step 'AttestationVerification' [1662460943.774889][33107:33112] CHIP:CTL: Verifying attestation - [1662460943.775749][33107:33112] CHIP:CTL: Failed in verifying "Attestation Information" command received from the device: err 603. Look at AttestationVerificationResult enum to understand the errors - [1662460943.775757][33107:33112] CHIP:CTL: Error on commissioning step "AttestationVerification": "../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1027: CHIP Error 0x000000AC: Internal error" + [1662460943.775749][33107:33112] CHIP:CTL: Failed in verifying 'Attestation Information' command received from the device: err 603. Look at AttestationVerificationResult enum to understand the errors + [1662460943.775757][33107:33112] CHIP:CTL: Error on commissioning step 'AttestationVerification': '../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1027: CHIP Error 0x000000AC: Internal error' [1662460943.775760][33107:33112] CHIP:CTL: Failed to perform commissioning step 8 - [1662460943.775763][33107:33112] CHIP:CTL: Going from commissioning step "AttestationVerification" with lastErr = "../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1027: CHIP Error 0x000000AC: Internal error" -> "Cleanup + [1662460943.775763][33107:33112] CHIP:CTL: Going from commissioning step 'AttestationVerification' with lastErr = '../../third_party/connectedhomeip/src/controller/CHIPDeviceController.cpp:1027: CHIP Error 0x000000AC: Internal error' -> 'Cleanup disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DD_1_11.yaml b/src/app/tests/suites/certification/Test_TC_DD_1_11.yaml index 4a93bed79a1fd0..8f19eff7491c13 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_1_11.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_1_11.yaml @@ -75,8 +75,8 @@ tests: disabled: true - label: - "Verify the DUT follows the correct order of onboarding the TH devices - which must be from first to last starting from left to right." + "Verify the DUT indicates to the user the need to commission TH + devices one by one by scanning their individual QR codes." PICS: "!(MCORE.DD.CTRL_CONCATENATED_QR_CODE_1) && MCORE.DD.CTRL_CONCATENATED_QR_CODE_2" @@ -99,3 +99,12 @@ tests: https://github.com/project-chip/connectedhomeip/issues/5331 Vendor specific field testcase disabled: true + + - label: + "Scan QR code using concatenation (which supports the commissioning of + all the TH devices)" + verification: | + Out of Scope for V1.0 as Concatenated QR codes are not supported yet + https://github.com/project-chip/connectedhomeip/issues/5331 + Vendor specific field testcase + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DD_1_5.yaml b/src/app/tests/suites/certification/Test_TC_DD_1_5.yaml index a0b48dbd0c13ac..ea994916135bce 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_1_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_1_5.yaml @@ -91,7 +91,7 @@ tests: disabled: true - label: "Power on DUT. Bring in NFC scanner close to NFC tag" - PICS: MCORE.DD.PHYSICAL_TAMPERING + PICS: "!MCORE.DD.PHYSICAL_TAMPERING" verification: | 1. Power on the DUT. 2. Using an NFC Scanner, physically bring the scanner close to the DUT. diff --git a/src/app/tests/suites/certification/Test_TC_DD_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DD_2_1.yaml index 0e3f3ead6619da..7365862af85268 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_2_1.yaml @@ -35,11 +35,15 @@ tests: disabled: true - label: - "If TH knows the DUTs Discovery Capability Bitmask, it starts the - commissioning process in any order of priority on all of the - networking technologies that are supported by both the TH and the DUT" + "If TH is aware of the DUT's Discovery Capability Bitmask, it SHALL + initiate Device Discovery in any order of priority on all the + networking technologies that are supported by both the TH and the DUT + If TH is unaware of the DUT's Discovery Capability Bitmask, it SHALL + initiate Device Discovery in any order on all the networking + technologies it supports out of Wi-Fi Soft-AP, BLE, and on IP network + discovery." verification: | - TH selects the DUT"s capability bitmask and start the commissiong process accordingly + TH selects the DUT's capability bitmask and start the commissiong process accordingly No applicable TH or DUT logs. disabled: true @@ -78,63 +82,57 @@ tests: Observe the DUT advertising in a commissionable state disabled: true - - label: "TH does not respond to DUT and DUT keeps sending ADVs" + - label: + "DUT begins sending ADVs. TH does not respond to these DUT ADVs so + that the DUT can keep sending ADVs" PICS: MCORE.COM.BLE verification: | - Verify in DUT(ALL-CLUSTER-APP) + No applicable TH logs. - [5855][P][DIS]Advertise commission parameter vendorID=65521 productID=32773 discriminator=3840/15 + 1. This step can be verified using a BLE discovery tool of choice. + Try NRF Connect app (https://www.nordicsemi.com/Products/Development-tools/nrf-connect-for-desktop) + OR + HCIDump (https://ubuntu.com/core/docs/bluez/reference/commands) + 2. Observe the Service Data being advertised in Hexidecimal format + For example, "F6-FF-00-01-0F-F1-FF-01-80-00" would translate to: + 0xF6, 0xFF= 0xFFF6 = 16-bit Matter UUID assigned by Bluetooth SIG + 0x00 = 0x00 (Commissionable) = Matter BLE OpCode + 0x01, 0x0F = 0x0F01 = 3841 Discriminator + 0xF1, 0xFF, = 0xFFF1 = 65521 VendorID + 0x01, 0x80 = 0x8001 = 32769 Product ID + 0x00 = Additional Data Flag disabled: true - label: "TH does not respond to DUT and DUT keeps sending ADVs" PICS: MCORE.COM.BLE verification: | - No applicable TH or DUT logs. + No applicable TH logs. This step can be verified using a BLE discovery tool of choice. Try NRF Connect app (https://www.nordicsemi.com/Products/Development-tools/nrf-connect-for-desktop) OR - HCIDump (https://ubuntu.com/core/docs/bluez/reference/commands) + HCIDump (https://ubuntu.com/core/docs/bluez/reference/commands)+++ disabled: true - label: "TH does not respond to DUT and DUT keeps sending ADVs" PICS: MCORE.COM.BLE verification: | - This BLE advertisements can be verified using BLE discovery tool of choice (Try NRF Connect OR HCIDump) + No applicable TH logs. + + This BLE advertisements can be verified using BLE discovery tool of choice. + Try NRF Connect app (https://www.nordicsemi.com/Products/Development-tools/nrf-connect-for-desktop) + OR + HCIDump (https://ubuntu.com/core/docs/bluez/reference/commands) ->For T0 and 30s we have to get advertisement range between 20ms to 60ms ->For 30s and 15mins we have to get advertisement range between 150ms to 1200ms - Verify in DUT(ALL-CLUSTER-APP) - - I: 3242 [DL]CHIPoBLE advertising started - I: 3279 [DL]NFC Tag emulation started - I: 33245 [DL]CHIPoBLE advertising mode changed to slow - D: 901346 [DIS]OnExpiration callback for cleared session - D: 901351 [DIS]Extended discovery timeout cancelled - I: 903097 [SVR]Closing pairing window - D: 903100 [IN]SecureSession Released 0x20002c00 Type:1 LSID:27704 - I: 903106 [DIS]Updating services using commissioning mode 0 - D: 903111 [DL]Using Thread extended MAC for hostname. - D: 903116 [DL]Using Thread extended MAC for hostname. - I: 903138 [DIS]Advertise commission parameter vendorID=65521 productID=32784 di5 - E: 903147 [DIS]Failed to advertise extended commissionable node: Error CHIP:0x03 - - - After 900s (that is 15min) advertisement stops - Verify in DUT(ALL-CLUSTER-APP) - - D: 903154 [DIS]Scheduling extended discovery timeout in 900s - E: 903160 [DIS]Failed to finalize service update: Error CHIP:0x0000001C - D: 903166 [DL]CHIPoBLE advertising set to off - I: 903171 [DL]CHIPoBLE advertising stopped - I: 903174 [DL]NFC Tag emulation stopped disabled: true - label: "TH does not respond to DUT. User power cycles the DUT" PICS: MCORE.COM.BLE verification: | - 1. Reboot the DUT commissionee + No applicable TH logs. - sudo reboot + 1. Reboot the DUT commissionee according to manufacturer's instructions disabled: true - label: @@ -142,11 +140,14 @@ tests: least 15 minutes" PICS: MCORE.COM.BLE verification: | - Check timestamp, ADV stop after 15 mins - Verify in DUT(ALL-CLUSTER-APP) + No applicable TH logs. - D: 903154 [DIS]Scheduling extended discovery timeout in 900s - E: 903160 [DIS]Failed to finalize service update: Error CHIP:0x0000001C + 1. Discover commissionables over BLE using a BLE discovery tool of choice. + Try NRF Connect app (https://www.nordicsemi.com/Products/Development-tools/nrf-connect-for-desktop) + OR + HCIDump (https://ubuntu.com/core/docs/bluez/reference/commands) + 2. After DUT has been advertising for 2min59sec (right before the minimum 3min mark), check that the DUT is still advertising over BLE + 3. After DUT has been advertising for 15min, check that the DUT has stopped advertising over BLE disabled: true - label: "TH scans and finds the DUT SSID" @@ -174,8 +175,11 @@ tests: disabled: true - label: - "TH and DUT are connected to the same network and the DUT is sending - mandatory Commissionable Node Discovery service records over DNS-SD." + "TH and DUT are connected to the same network through vendor-unique + means or by commissioning the DUT onto the Matter network and opening + a commissioning window. The DUT is sending mandatory Commissionable + Node Discovery service records over DNS-SD.|DUT is able to be + discovered over DNS-SD." verification: | ./chip-all-clusters-app ... @@ -193,10 +197,10 @@ tests: [1646286638.377915][11651:11651] CHIP:SVR: https://dhrishi.github.io/connectedhomeip/qrcode.html?data=MT%3A-24J042C00KA0648G00 [1646286638.377986][11651:11651] CHIP:SVR: Manual pairing code: [34970112332] - ./chip-tool discover commissionables + ./chip-tool discover commissionables Verify in TH (CHIP-TOOL) - Example output using all-clusters-app"s advertisements: + Example output using all-clusters-app's advertisements: [1651256405894] [18453:593886] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:192.168.1.2 [1651256405894] [18453:593886] CHIP: [DIS] Vendor ID: 65521 [1651256405894] [18453:593886] CHIP: [DIS] Product ID: 32769 @@ -217,47 +221,247 @@ tests: - label: "TH and DUT are connected to the same network and the DUT is sending optional Commissionable Node Discovery service records over DNS-SD." - PICS: - MCORE.DD.TXT_KEY_VP && MCORE.DD.TXT_KEY_DT && MCORE.DD.TXT_KEY_DN && - MCORE.DD.TXT_KEY_RI && MCORE.DD.TXT_KEY_PH && MCORE.DD.TXT_KEY_PI + PICS: MCORE.DD.TXT_KEY_VP verification: | - ./chip-tool discover commissionables - Verify in TH (CHIP-TOOL) + $ ./chip-tool discover commissionables + Verify in TH as commissioner side: + + Example output using all-clusters-app's advertisements found on the TH commissioner: + [1674595314229] [66646:12313662] [DIS] Discovered node: + [1674595314229] [66646:12313662] [DIS] Hostname: 010203040506 + [1674595314229] [66646:12313662] [DIS] IP Address #1: fe80::2ca0:93c7:6e52:5b12 + [1674595314229] [66646:12313662] [DIS] IP Address #2: fd11:1111:1122:2222:c15b:6c2c:eef:3c07 + [1674595314229] [66646:12313662] [DIS] IP Address #3: fdf1:228a:1759:0:e96:da4d:3138:a0c5 + [1674595314229] [66646:12313662] [DIS] Port: 5540 + [1674595314229] [66646:12313662] [DIS] Mrp Interval idle: not present + [1674595314229] [66646:12313662] [DIS] Mrp Interval active: not present + [1674595314229] [66646:12313662] [DIS] TCP Supported: 0 + [1674595314229] [66646:12313662] [DIS] Rotating ID: AB + [1674595314229] [66646:12313662] [DIS] Device Name: Test Bulb + [1674595314229] [66646:12313662] [DIS] Vendor ID: 65521 + [1674595314229] [66646:12313662] [DIS] Product ID: 32769 + [1674595314229] [66646:12313662] [DIS] Device Type: 257 + [1674595314229] [66646:12313662] [DIS] Long Discriminator: 840 + [1674595314229] [66646:12313662] [DIS] Pairing Instruction: 10 + [1674595314229] [66646:12313662] [DIS] Pairing Hint: 33 + [1674595314229] [66646:12313662] [DIS] Instance Name: D75A66B8EE701A71 + [1674595314229] [66646:12313662] [DIS] Commissioning Mode: 0 + + OR + 1. User a dns-sd records browser + $ avahi-browse _matterc._udp -r + + Example output using all-clusters-app's advertisements: + = wlan0 IPv6 32635B3D67B32ABB _matterc._udp local + hostname = [010203040506.local] + address = [fe80::3d59:5ecc:1961:27b0] + port = [5540] + txt = ["PI=10" "PH=33" "RI=AB" "CM=0" "D=840" "DN=Test Bulb" "DT=257" "VP=65521+32769"] + disabled: true + + - label: + "TH and DUT are connected to the same network and the DUT is sending + optional Commissionable Node Discovery service records over DNS-SD." + PICS: MCORE.DD.TXT_KEY_DT + verification: | + $ ./chip-tool discover commissionables + Verify in TH as commissioner side: + + Example output using all-clusters-app's advertisements found on the TH commissioner: + [1674595314229] [66646:12313662] [DIS] Discovered node: + [1674595314229] [66646:12313662] [DIS] Hostname: 010203040506 + [1674595314229] [66646:12313662] [DIS] IP Address #1: fe80::2ca0:93c7:6e52:5b12 + [1674595314229] [66646:12313662] [DIS] IP Address #2: fd11:1111:1122:2222:c15b:6c2c:eef:3c07 + [1674595314229] [66646:12313662] [DIS] IP Address #3: fdf1:228a:1759:0:e96:da4d:3138:a0c5 + [1674595314229] [66646:12313662] [DIS] Port: 5540 + [1674595314229] [66646:12313662] [DIS] Mrp Interval idle: not present + [1674595314229] [66646:12313662] [DIS] Mrp Interval active: not present + [1674595314229] [66646:12313662] [DIS] TCP Supported: 0 + [1674595314229] [66646:12313662] [DIS] Rotating ID: AB + [1674595314229] [66646:12313662] [DIS] Device Name: Test Bulb + [1674595314229] [66646:12313662] [DIS] Vendor ID: 65521 + [1674595314229] [66646:12313662] [DIS] Product ID: 32769 + [1674595314229] [66646:12313662] [DIS] Device Type: 257 + [1674595314229] [66646:12313662] [DIS] Long Discriminator: 840 + [1674595314229] [66646:12313662] [DIS] Pairing Instruction: 10 + [1674595314229] [66646:12313662] [DIS] Pairing Hint: 33 + [1674595314229] [66646:12313662] [DIS] Instance Name: D75A66B8EE701A71 + [1674595314229] [66646:12313662] [DIS] Commissioning Mode: 0 + + OR + 1. User a dns-sd records browser + $ avahi-browse _matterc._udp -r + + Example output using all-clusters-app's advertisements: + = wlan0 IPv6 32635B3D67B32ABB _matterc._udp local + hostname = [010203040506.local] + address = [fe80::3d59:5ecc:1961:27b0] + port = [5540] + txt = ["PI=10" "PH=33" "RI=AB" "CM=0" "D=840" "DN=Test Bulb" "DT=257" "VP=65521+32769"] + disabled: true + + - label: + "TH and DUT are connected to the same network and the DUT is sending + optional Commissionable Node Discovery service records over DNS-SD." + PICS: MCORE.DD.TXT_KEY_DN + verification: | + $ ./chip-tool discover commissionables + Verify in TH as commissioner side: + + Example output using all-clusters-app's advertisements found on the TH commissioner: + [1674595314229] [66646:12313662] [DIS] Discovered node: + [1674595314229] [66646:12313662] [DIS] Hostname: 010203040506 + [1674595314229] [66646:12313662] [DIS] IP Address #1: fe80::2ca0:93c7:6e52:5b12 + [1674595314229] [66646:12313662] [DIS] IP Address #2: fd11:1111:1122:2222:c15b:6c2c:eef:3c07 + [1674595314229] [66646:12313662] [DIS] IP Address #3: fdf1:228a:1759:0:e96:da4d:3138:a0c5 + [1674595314229] [66646:12313662] [DIS] Port: 5540 + [1674595314229] [66646:12313662] [DIS] Mrp Interval idle: not present + [1674595314229] [66646:12313662] [DIS] Mrp Interval active: not present + [1674595314229] [66646:12313662] [DIS] TCP Supported: 0 + [1674595314229] [66646:12313662] [DIS] Rotating ID: AB + [1674595314229] [66646:12313662] [DIS] Device Name: Test Bulb + [1674595314229] [66646:12313662] [DIS] Vendor ID: 65521 + [1674595314229] [66646:12313662] [DIS] Product ID: 32769 + [1674595314229] [66646:12313662] [DIS] Device Type: 257 + [1674595314229] [66646:12313662] [DIS] Long Discriminator: 840 + [1674595314229] [66646:12313662] [DIS] Pairing Instruction: 10 + [1674595314229] [66646:12313662] [DIS] Pairing Hint: 33 + [1674595314229] [66646:12313662] [DIS] Instance Name: D75A66B8EE701A71 + [1674595314229] [66646:12313662] [DIS] Commissioning Mode: 0 + + OR + 1. User a dns-sd records browser + $ avahi-browse _matterc._udp -r + + Example output using all-clusters-app's advertisements: + = wlan0 IPv6 32635B3D67B32ABB _matterc._udp local + hostname = [010203040506.local] + address = [fe80::3d59:5ecc:1961:27b0] + port = [5540] + txt = ["PI=10" "PH=33" "RI=AB" "CM=0" "D=840" "DN=Test Bulb" "DT=257" "VP=65521+32769"] + disabled: true + + - label: + "TH and DUT are connected to the same network and the DUT is sending + optional Commissionable Node Discovery service records over DNS-SD." + PICS: MCORE.DD.TXT_KEY_RI + verification: | + $ ./chip-tool discover commissionables + Verify in TH as commissioner side: + + Example output using all-clusters-app's advertisements found on the TH commissioner: + [1674595314229] [66646:12313662] [DIS] Discovered node: + [1674595314229] [66646:12313662] [DIS] Hostname: 010203040506 + [1674595314229] [66646:12313662] [DIS] IP Address #1: fe80::2ca0:93c7:6e52:5b12 + [1674595314229] [66646:12313662] [DIS] IP Address #2: fd11:1111:1122:2222:c15b:6c2c:eef:3c07 + [1674595314229] [66646:12313662] [DIS] IP Address #3: fdf1:228a:1759:0:e96:da4d:3138:a0c5 + [1674595314229] [66646:12313662] [DIS] Port: 5540 + [1674595314229] [66646:12313662] [DIS] Mrp Interval idle: not present + [1674595314229] [66646:12313662] [DIS] Mrp Interval active: not present + [1674595314229] [66646:12313662] [DIS] TCP Supported: 0 + [1674595314229] [66646:12313662] [DIS] Rotating ID: AB + [1674595314229] [66646:12313662] [DIS] Device Name: Test Bulb + [1674595314229] [66646:12313662] [DIS] Vendor ID: 65521 + [1674595314229] [66646:12313662] [DIS] Product ID: 32769 + [1674595314229] [66646:12313662] [DIS] Device Type: 257 + [1674595314229] [66646:12313662] [DIS] Long Discriminator: 840 + [1674595314229] [66646:12313662] [DIS] Pairing Instruction: 10 + [1674595314229] [66646:12313662] [DIS] Pairing Hint: 33 + [1674595314229] [66646:12313662] [DIS] Instance Name: D75A66B8EE701A71 + [1674595314229] [66646:12313662] [DIS] Commissioning Mode: 0 - Example output using all-clusters-app"s advertisements found on the TH commissioner: - [1657218902314] [29617:16663220] CHIP: [DL] Browsing for: _matterc._udp - [1657218902488] [29617:16663220] CHIP: [DL] Mdns: OnBrowseAdd name: 5B4185091B6CAD28, type: _matterc._udp., domain: local., interface: 7 - [1657218902488] [29617:16663220] CHIP: [DL] Resolve type=_matterc._udp name=5B4185091B6CAD28 interface=7 - [1657218902489] [29617:16663220] CHIP: [DL] Mdns : OnNewInterface hostname:DCA6328D2B9F0000.local. fullname:5B4185091B6CAD28._matterc._udp.local. interface: 7 - [1657218902490] [29617:16663220] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:fd54:23a1:c6de:4637:4c4:ee82:2a0f:b5e2 - [1657218902490] [29617:16663220] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:fe80::1e81:3e0:3865:2d29 - [1657218902490] [29617:16663220] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:192.168.1.10 - [1657218902490] [29617:16663220] CHIP: [DIS] Hostname: DCA6328D2B9F0000 - [1657218902490] [29617:16663220] CHIP: [DIS] IP Address #1: fd54:23a1:c6de:4637:4c4:ee82:2a0f:b5e2 - [1657218902490] [29617:16663220] CHIP: [DIS] IP Address #2: fe80::1e81:3e0:3865:2d29 - [1657218902490] [29617:16663220] CHIP: [DIS] IP Address #3: 192.168.1.10 - [1657218902490] [29617:16663220] CHIP: [DIS] Port: 5540 - [1657218902490] [29617:16663220] CHIP: [DIS] Mrp Interval idle: 5000 ms - [1657218902490] [29617:16663220] CHIP: [DIS] Mrp Interval active: 300 ms - [1657218902490] [29617:16663220] CHIP: [DIS] Vendor ID: 65521 - [1657218902490] [29617:16663220] CHIP: [DIS] Product ID: 32769 - [1657218902490] [29617:16663220] CHIP: [DIS] Long Discriminator: 3840 - [1657218902490] [29617:16663220] CHIP: [DIS] Pairing Hint: 33 - [1657218902490] [29617:16663220] CHIP: [DIS] Instance Name: 5B4185091B6CAD28 - [1657218902490] [29617:16663220] CHIP: [DIS] Commissioning Mode: 1 + OR + 1. User a dns-sd records browser + $ avahi-browse _matterc._udp -r + + Example output using all-clusters-app's advertisements: + = wlan0 IPv6 32635B3D67B32ABB _matterc._udp local + hostname = [010203040506.local] + address = [fe80::3d59:5ecc:1961:27b0] + port = [5540] + txt = ["PI=10" "PH=33" "RI=AB" "CM=0" "D=840" "DN=Test Bulb" "DT=257" "VP=65521+32769"] + disabled: true + - label: + "TH and DUT are connected to the same network and the DUT is sending + optional Commissionable Node Discovery service records over DNS-SD." + PICS: MCORE.DD.TXT_KEY_PH + verification: | + $ ./chip-tool discover commissionables + Verify in TH as commissioner side: + + Example output using all-clusters-app's advertisements found on the TH commissioner: + [1674595314229] [66646:12313662] [DIS] Discovered node: + [1674595314229] [66646:12313662] [DIS] Hostname: 010203040506 + [1674595314229] [66646:12313662] [DIS] IP Address #1: fe80::2ca0:93c7:6e52:5b12 + [1674595314229] [66646:12313662] [DIS] IP Address #2: fd11:1111:1122:2222:c15b:6c2c:eef:3c07 + [1674595314229] [66646:12313662] [DIS] IP Address #3: fdf1:228a:1759:0:e96:da4d:3138:a0c5 + [1674595314229] [66646:12313662] [DIS] Port: 5540 + [1674595314229] [66646:12313662] [DIS] Mrp Interval idle: not present + [1674595314229] [66646:12313662] [DIS] Mrp Interval active: not present + [1674595314229] [66646:12313662] [DIS] TCP Supported: 0 + [1674595314229] [66646:12313662] [DIS] Rotating ID: AB + [1674595314229] [66646:12313662] [DIS] Device Name: Test Bulb + [1674595314229] [66646:12313662] [DIS] Vendor ID: 65521 + [1674595314229] [66646:12313662] [DIS] Product ID: 32769 + [1674595314229] [66646:12313662] [DIS] Device Type: 257 + [1674595314229] [66646:12313662] [DIS] Long Discriminator: 840 + [1674595314229] [66646:12313662] [DIS] Pairing Instruction: 10 + [1674595314229] [66646:12313662] [DIS] Pairing Hint: 33 + [1674595314229] [66646:12313662] [DIS] Instance Name: D75A66B8EE701A71 + [1674595314229] [66646:12313662] [DIS] Commissioning Mode: 0 OR 1. User a dns-sd records browser - avahi-browse _matterc._udp -r + $ avahi-browse _matterc._udp -r - Example output using all-clusters-app"s advertisements: - + eth0 IPv6 1E36C55245E2908D _matterc._udp local - = eth0 IPv6 1E36C55245E2908D _matterc._udp local - hostname = [DCA6328D2B9F0000.local] - address = [192.168.1.10] + Example output using all-clusters-app's advertisements: + = wlan0 IPv6 32635B3D67B32ABB _matterc._udp local + hostname = [010203040506.local] + address = [fe80::3d59:5ecc:1961:27b0] port = [5540] - txt = ["PI=" "PH=33" "CM=1" "D=3840" "T=1" "SAI=300" "SII=5000" "VP=65521+32769"] + txt = ["PI=10" "PH=33" "RI=AB" "CM=0" "D=840" "DN=Test Bulb" "DT=257" "VP=65521+32769"] + disabled: true + + - label: + "TH and DUT are connected to the same network and the DUT is sending + optional Commissionable Node Discovery service records over DNS-SD." + PICS: MCORE.DD.TXT_KEY_PI + verification: | + $ ./chip-tool discover commissionables + Verify in TH as commissioner side: + + Example output using all-clusters-app's advertisements found on the TH commissioner: + [1674595314229] [66646:12313662] [DIS] Discovered node: + [1674595314229] [66646:12313662] [DIS] Hostname: 010203040506 + [1674595314229] [66646:12313662] [DIS] IP Address #1: fe80::2ca0:93c7:6e52:5b12 + [1674595314229] [66646:12313662] [DIS] IP Address #2: fd11:1111:1122:2222:c15b:6c2c:eef:3c07 + [1674595314229] [66646:12313662] [DIS] IP Address #3: fdf1:228a:1759:0:e96:da4d:3138:a0c5 + [1674595314229] [66646:12313662] [DIS] Port: 5540 + [1674595314229] [66646:12313662] [DIS] Mrp Interval idle: not present + [1674595314229] [66646:12313662] [DIS] Mrp Interval active: not present + [1674595314229] [66646:12313662] [DIS] TCP Supported: 0 + [1674595314229] [66646:12313662] [DIS] Rotating ID: AB + [1674595314229] [66646:12313662] [DIS] Device Name: Test Bulb + [1674595314229] [66646:12313662] [DIS] Vendor ID: 65521 + [1674595314229] [66646:12313662] [DIS] Product ID: 32769 + [1674595314229] [66646:12313662] [DIS] Device Type: 257 + [1674595314229] [66646:12313662] [DIS] Long Discriminator: 840 + [1674595314229] [66646:12313662] [DIS] Pairing Instruction: 10 + [1674595314229] [66646:12313662] [DIS] Pairing Hint: 33 + [1674595314229] [66646:12313662] [DIS] Instance Name: D75A66B8EE701A71 + [1674595314229] [66646:12313662] [DIS] Commissioning Mode: 0 + + OR + 1. User a dns-sd records browser + $ avahi-browse _matterc._udp -r + + Example output using all-clusters-app's advertisements: + = wlan0 IPv6 32635B3D67B32ABB _matterc._udp local + hostname = [010203040506.local] + address = [fe80::3d59:5ecc:1961:27b0] + port = [5540] + txt = ["PI=10" "PH=33" "RI=AB" "CM=0" "D=840" "DN=Test Bulb" "DT=257" "VP=65521+32769"] disabled: true - label: "Place the DUT device into a non-commissionable state" @@ -279,7 +483,7 @@ tests: ./chip-tool discover commissionables Verify in TH (CHIP-TOOL) - Example output using all-clusters-app"s advertisements found on the TH commissioner: + Example output using all-clusters-app's advertisements found on the TH commissioner: [1651256405894] [18453:593886] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:192.168.1.2 [1651256405894] [18453:593886] CHIP: [DIS] Vendor ID: 65521 [1651256405894] [18453:593886] CHIP: [DIS] Product ID: 32769 @@ -306,7 +510,7 @@ tests: Vendor specific, take DUT out of commissioning mode dns-sd -B _services._dns-sd._udp - Example output using all-clusters-app"s advertisements: + Example output using all-clusters-app's advertisements: 11:30:36.040 Add 3 7 . _sub.local. _L3840 11:30:36.040 Add 3 7 . _sub.local. _S15 11:30:36.040 Add 2 7 . _sub.local. _CM @@ -320,33 +524,33 @@ tests: PICS: MCORE.DD.COMMISSIONING_SUBTYPE_V && MCORE.DD.COMMISSIONING_SUBTYPE_T verification: | Vendor specific, take DUT out of commissioning mode - dns-sd -B _services._dns-sd._udp + dns-sd -B _services._dns-sd._udp - Example output using all-clusters-app"s advertisements found on the TH commissioner: + Example output using all-clusters-app's advertisements found on the TH commissioner: 11:56:29.770 Add 3 7 . _sub.local. _V65521 disabled: true - label: "Place the DUT device into Commissioning mode" verification: | - ./chip-tool discover commissionables - Verify in TH (CHIP-TOOL) - - Example output using all-clusters-app"s advertisements found on the TH commissioner: - [1651256405894] [18453:593886] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:192.168.1.2 - [1651256405894] [18453:593886] CHIP: [DIS] Vendor ID: 65521 - [1651256405894] [18453:593886] CHIP: [DIS] Product ID: 32769 - [1651256405894] [18453:593886] CHIP: [DIS] Long Discriminator: 3840 - [1651256405894] [18453:593886] CHIP: [DIS] Pairing Hint: 33 - [1651256405894] [18453:593886] CHIP: [DIS] Hostname: DCA6328D2B9F0000 - [1651256405894] [18453:593886] CHIP: [DIS] Instance Name: 8FFEE04E82830E26 - [1651256405894] [18453:593886] CHIP: [DIS] IP Address #1: fd54:23a1:c6de:4637:dea6:32ff:fe8d:2b9f - [1651256405894] [18453:593886] CHIP: [DIS] IP Address #2: fe80::dea6:32ff:fe8d:2b9f - [1651256405894] [18453:593886] CHIP: [DIS] IP Address #3: fe80::dea6:32ff:fe8d:2ba0 - [1651256405894] [18453:593886] CHIP: [DIS] IP Address #4: 192.168.1.2 - [1651256405894] [18453:593886] CHIP: [DIS] Port: 5540 - [1651256405894] [18453:593886] CHIP: [DIS] Commissioning Mode: 1 - [1651256405894] [18453:593886] CHIP: [DIS] Mrp Interval idle: 5000 ms - [1651256405894] [18453:593886] CHIP: [DIS] Mrp Interval active: 300 ms + $ ./chip-tool discover commissionables + Verify in TH as commissioner side: + + Example output using all-clusters-app's advertisements found on the TH commissioner: + [1674601355.769735][9780:9782] CHIP:DIS: Discovered node: + [1674601355.769786][9780:9782] CHIP:DIS: Hostname: 88665A0BE29E + [1674601355.769826][9780:9782] CHIP:DIS: IP Address #1: fd11:1111:1122:2222:8cd:a043:f97:9d96 + [1674601355.769852][9780:9782] CHIP:DIS: IP Address #2: fe80::cab:7cb7:31cb:cd5c + [1674601355.769876][9780:9782] CHIP:DIS: IP Address #3: 17.112.82.171 + [1674601355.769898][9780:9782] CHIP:DIS: Port: 5540 + [1674601355.769920][9780:9782] CHIP:DIS: Mrp Interval idle: not present + [1674601355.769942][9780:9782] CHIP:DIS: Mrp Interval active: not present + [1674601355.769963][9780:9782] CHIP:DIS: TCP Supported: 1 + [1674601355.769986][9780:9782] CHIP:DIS: Vendor ID: 65521 + [1674601355.770005][9780:9782] CHIP:DIS: Product ID: 32769 + [1674601355.770026][9780:9782] CHIP:DIS: Long Discriminator: 3841 + [1674601355.770048][9780:9782] CHIP:DIS: Pairing Hint: 33 + [1674601355.770070][9780:9782] CHIP:DIS: Instance Name: A043306EF9D2CB3F + [1674601355.770093][9780:9782] CHIP:DIS: Commissioning Mode: 1 disabled: true - label: @@ -354,27 +558,21 @@ tests: command-line test tool (i.e. 'dns-sd -B _matterc._udp' or 'avahi-browse _matterc._udp -r')" verification: | - ./chip-tool discover commissionables - Verify in TH (CHIP-TOOL) + Verify using the DNS-SD records command-line test tool: + $ dns-sd -B _matterc._udp + Browsing for _matterc._udp + DATE: ---Tue 24 Jan 2023--- + 22:56:40.175 ...STARTING... + Timestamp A/R Flags if Domain Service Type Instance Name + 22:56:40.175 Add 2 2 local. _matterc._udp. A043306EF9D2CB3F + + OR - [1657220492275] [29906:16679893] CHIP: [DL] Browsing for: _matterc._udp - [1657220492275] [29906:16679893] CHIP: [DL] Mdns: OnBrowseAdd name: 74AFA51731B2E373, type: _matterc._udp., domain: local., interface: 7 - [1657220492275] [29906:16679893] CHIP: [DL] Resolve type=_matterc._udp name=74AFA51731B2E373 interface=7 - [1657220492276] [29906:16679893] CHIP: [DL] Mdns : OnNewInterface hostname:DCA6328D2B9F0000.local. fullname:74AFA51731B2E373._matterc._udp.local. interface: 7 - [1657220492277] [29906:16679893] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:fd54:23a1:c6de:4637:4c4:ee82:2a0f:b5e2 - [1657220492277] [29906:16679893] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:fe80::1e81:3e0:3865:2d29 - [1657220492277] [29906:16679893] CHIP: [DL] Mdns: OnNewAddress interface: 7 ip:192.168.1.10 - [1657220492277] [29906:16679893] CHIP: [DIS] Hostname: DCA6328D2B9F0000 - [1657220492277] [29906:16679893] CHIP: [DIS] IP Address #1: fd54:23a1:c6de:4637:4c4:ee82:2a0f:b5e2 - [1657220492277] [29906:16679893] CHIP: [DIS] IP Address #2: fe80::1e81:3e0:3865:2d29 - [1657220492277] [29906:16679893] CHIP: [DIS] IP Address #3: 192.168.1.10 - [1657220492277] [29906:16679893] CHIP: [DIS] Port: 5540 - [1657220492277] [29906:16679893] CHIP: [DIS] Mrp Interval idle: 5000 ms - [1657220492277] [29906:16679893] CHIP: [DIS] Mrp Interval active: 300 ms - [1657220492277] [29906:16679893] CHIP: [DIS] Vendor ID: 65521 - [1657220492277] [29906:16679893] CHIP: [DIS] Product ID: 32769 - [1657220492277] [29906:16679893] CHIP: [DIS] Long Discriminator: 3840 - [1657220492277] [29906:16679893] CHIP: [DIS] Pairing Hint: 33 - [1657220492277] [29906:16679893] CHIP: [DIS] Instance Name: 74AFA51731B2E373 - [1657220492277] [29906:16679893] CHIP: [DIS] Commissioning Mode: 1 + $ avahi-browse _matterc._udp -r + + eth0 IPv4 A043306EF9D2CB3F _matterc._udp local + = eth0 IPv4 A043306EF9D2CB3F _matterc._udp local + hostname = [88665A0BE29E.local] + address = [17.112.82.171] + port = [5540] + txt = ["PI=" "PH=33" "CM=1" "D=3841" "T=1" "VP=65521+32769"] disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DESC_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DESC_1_1.yaml index 17462b1eea9258..92072fbcfa1f6e 100644 --- a/src/app/tests/suites/certification/Test_TC_DESC_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DESC_1_1.yaml @@ -13,7 +13,7 @@ # limitations under the License. # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 84.1.1. [TC-DESC-1.1] Descriptor Cluster Attributes with DUT as Server +name: 84.1.1. [TC-DESC-1.1] Global Attributes [DUT-Server] PICS: - DESC.S diff --git a/src/app/tests/suites/certification/Test_TC_DGGEN_2_3.yaml b/src/app/tests/suites/certification/Test_TC_DGGEN_2_3.yaml index dc0bd78ee5b278..9601aa00adb4d0 100644 --- a/src/app/tests/suites/certification/Test_TC_DGGEN_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGGEN_2_3.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: 3.2.3. [TC-DGGEN-2.3] Command received at server as DUT +name: 3.2.3. [TC-DGGEN-2.3] Command Received [DUT Server] PICS: - DGGEN.S @@ -26,7 +26,13 @@ config: tests: - label: "Commission DUT to TH" verification: | + execute the below mentioned command to put DUT into a commissionable state, Pls use equivalent command on the respective DUT + ./chip-all-clusters-app + Once DUT reach the commissionable state pls send below mentioned command on TH. Pls use equivalent command on the respective DUT + ./chip-tool pairing onnetwork 1 20202021 + Verify the commissioning completed with success on TH1(chip-tool) from DUT + [1650455358.501816][4366:4371] CHIP:TOO: Device commissioning completed with success disabled: true - label: "TH reads TestEventTriggersEnabled attribute value" @@ -46,7 +52,7 @@ tests: verification: | Based on Spec, EnableKey value is to be provided by manufacturer below mentioned the example command to verify - ./chip-tool generaldiagnostics test-event-trigger 0 1 0 + ./chip-tool generaldiagnostics test-event-trigger 0 1 0 disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_DGTHREAD_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DGTHREAD_1_1.yaml index 34e54d331e9628..e67235545e6881 100644 --- a/src/app/tests/suites/certification/Test_TC_DGTHREAD_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGTHREAD_1_1.yaml @@ -130,7 +130,7 @@ tests: - label: "TH reads Feature dependent attribute(DGTHREAD.S.F01(ERRCNT)) in attributeList" - PICS: DGTHREAD.C.A0006 && DGTHREAD.S.F01 + PICS: DGTHREAD.S.A0006 && DGTHREAD.S.F01 command: "readAttribute" attribute: "AttributeList" response: diff --git a/src/app/tests/suites/certification/Test_TC_DGTHREAD_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DGTHREAD_2_1.yaml index c17b363bbf9ac1..1c77e9f164e00a 100644 --- a/src/app/tests/suites/certification/Test_TC_DGTHREAD_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGTHREAD_2_1.yaml @@ -345,7 +345,7 @@ tests: maxValue: 65535 - label: "TH reads ChildRoleCount attribute value from DUT" - PICS: DGTHREAD.S.A001f + PICS: DGTHREAD.S.A000f command: "readAttribute" attribute: "ChildRoleCount" response: diff --git a/src/app/tests/suites/certification/Test_TC_DGWIFI_3_2.yaml b/src/app/tests/suites/certification/Test_TC_DGWIFI_3_2.yaml index 0fe5432d7624ea..62460173bafef8 100644 --- a/src/app/tests/suites/certification/Test_TC_DGWIFI_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGWIFI_3_2.yaml @@ -35,7 +35,7 @@ tests: disabled: true - label: "DUT sends ResetCounts command to TH" - PICS: DGWIFI.S.C00.Rsp + PICS: DGWIFI.C.C00.Tx verification: | ./chip-tool wifinetworkdiagnostics reset-counts 1 0 diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_11.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_11.yaml index 179cbdb2d287e2..4f0afdf5be485b 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_11.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_11.yaml @@ -26,6 +26,15 @@ config: nodeId: 0x12344321 cluster: "Door Lock" endpoint: 1 + PINCredentialData: + type: octet_string + defaultValue: "123456" + RFIDCredentialData: + type: octet_string + defaultValue: "RFIDTESTDATA" + FingerVeinCredentialData: + type: octet_string + defaultValue: "123456" tests: - label: "Wait for the commissioned device to be retrieved" @@ -85,6 +94,51 @@ tests: - name: "NextUserIndex" value: null + - label: "TH reads NumberOfTotalUsersSupported and saves for future use." + PICS: DRLK.S.F08 && DRLK.S.A0011 + command: "readAttribute" + attribute: "NumberOfTotalUsersSupported" + response: + constraints: + minValue: 0 + maxValue: 65535 + + - label: "TH reads MinPINCodeLength and saves for future use." + PICS: DRLK.S.F08 && DRLK.S.F00 + command: "readAttribute" + attribute: "MinPINCodeLength" + response: + constraints: + minValue: 0 + maxValue: 255 + + - label: "TH reads MaxPINCodeLength and saves for future use." + PICS: DRLK.S.F08 && DRLK.S.F00 + command: "readAttribute" + attribute: "MaxPINCodeLength" + response: + constraints: + minValue: 0 + maxValue: 255 + + - label: "TH reads MinRFIDCodeLength and saves for future use." + PICS: DRLK.S.F08 && DRLK.S.F01 && DRLK.S.A001a + command: "readAttribute" + attribute: "MinRFIDCodeLength" + response: + constraints: + minValue: 0 + maxValue: 255 + + - label: "TH reads MaxRFIDCodeLength and saves for future use." + PICS: DRLK.S.F08 && DRLK.S.F01 && DRLK.S.A0019 + command: "readAttribute" + attribute: "MaxRFIDCodeLength" + response: + constraints: + minValue: 0 + maxValue: 255 + - label: "TH sends Set Credential Command to DUT with type PIN" PICS: DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx command: "SetCredential" @@ -96,7 +150,7 @@ tests: - name: "Credential" value: { CredentialType: 1, CredentialIndex: 1 } - name: "CredentialData" - value: "123456" + value: PINCredentialData - name: "UserIndex" value: 1 - name: "UserStatus" @@ -123,7 +177,7 @@ tests: - name: "Credential" value: { CredentialType: 2, CredentialIndex: 1 } - name: "CredentialData" - value: "RFIDTESTDATA" + value: RFIDCredentialData - name: "UserIndex" value: 1 - name: "UserStatus" @@ -150,7 +204,7 @@ tests: - name: "Credential" value: { CredentialType: 4, CredentialIndex: 1 } - name: "CredentialData" - value: "123456" + value: FingerVeinCredentialData - name: "UserIndex" value: 1 - name: "UserStatus" @@ -189,7 +243,7 @@ tests: value: null - label: "TH sends Get Credential Status Command with type RFID" - PICS: DRLK.S.F01 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx + PICS: DRLK.S.F08 && DRLK.S.F01 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx command: "GetCredentialStatus" arguments: values: @@ -211,7 +265,7 @@ tests: value: null - label: "TH sends Get Credential Status Command with type FingerVein" - PICS: DRLK.S.F02 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx + PICS: DRLK.S.F08 && DRLK.S.F02 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx command: "GetCredentialStatus" arguments: values: @@ -242,7 +296,7 @@ tests: value: { CredentialType: 1, CredentialIndex: 1 } - label: "TH sends Get Credential Status Command with type RFID" - PICS: DRLK.S.F01 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx + PICS: DRLK.S.F08 && DRLK.S.F01 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx command: "GetCredentialStatus" arguments: values: @@ -264,7 +318,7 @@ tests: value: null - label: "TH sends Get Credential Status Command with type FingerVein" - PICS: DRLK.S.F02 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx + PICS: DRLK.S.F08 && DRLK.S.F02 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx command: "GetCredentialStatus" arguments: values: @@ -295,7 +349,7 @@ tests: value: { CredentialType: 2, CredentialIndex: 1 } - label: "TH sends Get Credential Status Command with type FingerVein" - PICS: DRLK.S.F02 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx + PICS: DRLK.S.F08 && DRLK.S.F02 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx command: "GetCredentialStatus" arguments: values: diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_3.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_3.yaml index aaeeefc5b7aab2..d0208975307ad5 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_3.yaml @@ -138,7 +138,7 @@ tests: - label: "TH writes the RequirePINforRemoteOperation attribute value as False on the DUT and Verify DUT responds with UNSUPPORTED_WRITE" - PICS: DRLK.S.F07 && DRLK.S.F00 && ! DRLK.S.A0033 + PICS: DRLK.S.F07 && DRLK.S.F00 && !DRLK.S.A0033 command: "writeAttribute" attribute: "RequirePINforRemoteOperation" arguments: @@ -179,7 +179,7 @@ tests: - label: "TH writes the RequirePINforRemoteOperation attribute value as False on the DUT and Verify DUT responds with UNSUPPORTED_WRITE" - PICS: DRLK.S.F07 && DRLK.S.F00 && ! DRLK.S.A0033 + PICS: DRLK.S.F07 && DRLK.S.F00 && !DRLK.S.A0033 command: "writeAttribute" attribute: "RequirePINforRemoteOperation" arguments: @@ -308,7 +308,7 @@ tests: - label: "TH reads the UserCodeTemporaryDisableTime attribute from the DUT and check attribute is triggered" - PICS: DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0031 + PICS: DRLK.S.F00 && DRLK.S.F01 && DRLK.S.A0031 command: "readAttribute" attribute: "UserCodeTemporaryDisableTime" response: diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_7.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_7.yaml index b3c749e56b2345..fb87258a9516da 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_7.yaml @@ -320,10 +320,18 @@ tests: - name: "UserIndex" value: 1 - - label: "Cleanup the created user" + - label: "Cleanup the created user with UserIndex 1" command: "ClearUser" timedInteractionTimeoutMs: 10000 arguments: values: - name: "UserIndex" value: 1 + + - label: "Cleanup the created user with UserIndex 5" + command: "ClearUser" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "UserIndex" + value: 5 diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_9.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_9.yaml index 8d171385b893a6..160439902b1ca8 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_9.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_9.yaml @@ -167,8 +167,6 @@ tests: value: 0x85 - name: "UserIndex" value: null - - name: "NextCredentialIndex" - value: 3 - label: "TH sends Set Credential Command to DUT" PICS: DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx @@ -194,9 +192,8 @@ tests: value: 0x02 - name: "UserIndex" value: null - - name: "NextCredentialIndex" - value: 3 + # Need OR condition support - label: "TH sends Set Credential Command to DUT and Verify that the DUT sends Set Credential Response command with status as DUPLICATE or OCCUPIED" @@ -253,11 +250,11 @@ tests: "TH sends Set Credential Command to DUT and Verify that the DUT sends Set Credential Response command with response as OCCUPIED if the CredentialIndex is repeated" + PICS: PICS_USER_PROMPT && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx verification: | Mark as not applicable and proceed to next step ./chip-tool doorlock set-credential 2 '{ "credentialType" : 1, "credentialIndex" : 3 }' 1234567 1 null null 1 1 --timedInteractionTimeoutMs 1000 - Verify "DUT sends Set Credential Response command with response as OCCUPIED" on the TH(Chip-tool) Log: [1658473055.384297][2667:2672] CHIP:DMG: }, @@ -270,7 +267,6 @@ tests: [1658473055.384660][2667:2672] CHIP:TOO: } cluster: "LogCommands" command: "UserPrompt" - PICS: PICS_USER_PROMPT && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx arguments: values: - name: "message" @@ -352,8 +348,6 @@ tests: value: 0 - name: "UserIndex" value: null - - name: "NextCredentialIndex" - value: 2 - label: "TH sends Clear Credential Command to DUT" PICS: DRLK.S.F08 && DRLK.S.C26.Rsp diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_3_1.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_3_1.yaml index ceee072acb9ce2..27f3a5e87e6cc3 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_3_1.yaml @@ -270,7 +270,7 @@ tests: disabled: true - label: "DUT reads DoorState from the TH." - PICS: DRLK.S.F05 && DRLK.C.A0003 + PICS: DRLK.C.F05 && DRLK.C.A0003 verification: | ./chip-tool doorlock read door-state 1 1 @@ -348,7 +348,7 @@ tests: disabled: true - label: "DUT reads DoorOpenEvents from the TH." - PICS: DRLK.S.F05 && DRLK.C.A0004 + PICS: DRLK.C.F05 && DRLK.C.A0004 verification: | This is an Optional attribute, so its not compulsory to get the expected outcome @@ -430,7 +430,7 @@ tests: disabled: true - label: "DUT reads DoorClosedEvents from the TH." - PICS: DRLK.S.F05 && DRLK.C.A0005 + PICS: DRLK.C.F05 && DRLK.C.A0005 verification: | This is an Optional attribute, so its not compulsory to get the expected outcome @@ -511,7 +511,7 @@ tests: disabled: true - label: "DUT reads OpenPeriod from the TH." - PICS: DRLK.S.F05 && DRLK.C.A0006 + PICS: DRLK.C.F05 && DRLK.C.A0006 verification: | This is an Optional attribute, so its not compulsory to get the expected outcome @@ -591,7 +591,7 @@ tests: disabled: true - label: "DUT reads NumberOfTotalUsersSupportedfrom the TH." - PICS: DRLK.S.F05 && DRLK.C.A0011 + PICS: DRLK.C.F05 && DRLK.C.A0011 verification: | ./chip-tool doorlock read number-of-total-users-supported 1 1 @@ -1365,7 +1365,7 @@ tests: disabled: true - label: "DUT reads CredentialRulesSupport from the TH." - PICS: DRLK.S.F08 && DRLK.C.A001b + PICS: DRLK.C.F08 && DRLK.C.A001b verification: | ./chip-tool doorlock read credential-rules-support 1 1 diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_3_2.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_3_2.yaml index be7020c38c5ab6..234c3b16b68679 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_3_2.yaml @@ -322,7 +322,7 @@ tests: disabled: true - label: "DUT sends Set Week Day Schedule command to TH." - PICS: DRLK.S.F04 && DRLK.C.C0b.Tx + PICS: DRLK.C.F04 && DRLK.C.C0b.Tx verification: | ./chip-tool doorlock set-user 0 1 xxx 6452 1 0 0 1 1 --timedInteractionTimeoutMs 1000 @@ -520,7 +520,7 @@ tests: disabled: true - label: "DUT sends Get Week Day Schedule command to TH." - PICS: DRLK.S.F04 && DRLK.C.C0c.Tx + PICS: DRLK.C.F04 && DRLK.C.C0c.Tx verification: | ./chip-tool doorlock get-week-day-schedule 1 1 1 1 Verify the " Get Week Day Schedule command response" on TH(lock-app): @@ -617,7 +617,7 @@ tests: disabled: true - label: "DUT sends Clear Week Day Schedule command to TH." - PICS: DRLK.S.F04 && DRLK.C.C0d.Tx + PICS: DRLK.C.F04 && DRLK.C.C0d.Tx verification: | ./chip-tool doorlock clear-week-day-schedule 1 1 1 1 @@ -713,7 +713,7 @@ tests: disabled: true - label: "DUT sends Set Year Day Schedule command to TH." - PICS: DRLK.S.F04 && DRLK.C.C0e.Tx + PICS: DRLK.C.F04 && DRLK.C.C0e.Tx verification: | ./chip-tool doorlock set-year-day-schedule 1 1 1080 2100 1 1 @@ -809,7 +809,7 @@ tests: disabled: true - label: "DUT sends Get Year Day Schedule command to TH." - PICS: DRLK.S.F04 && DRLK.C.C0f.Tx + PICS: DRLK.C.F04 && DRLK.C.C0f.Tx verification: | ./chip-tool doorlock get-year-day-schedule 1 1 1 1 Verify the " Get Year Day Schedule command response" on TH(lock-app): @@ -904,7 +904,7 @@ tests: disabled: true - label: "DUT sends Clear Year Day Schedule command to TH." - PICS: DRLK.S.F04 && DRLK.C.C10.Tx + PICS: DRLK.C.F04 && DRLK.C.C10.Tx verification: | ./chip-tool doorlock clear-year-day-schedule 1 1 1 1 @@ -997,7 +997,7 @@ tests: disabled: true - label: "DUT sends Set Holiday Day Schedule command to TH." - PICS: DRLK.S.F04 && DRLK.C.C11.Tx + PICS: DRLK.C.F04 && DRLK.C.C11.Tx verification: | ./chip-tool doorlock set-holiday-schedule 1 20 30 0 1 1 @@ -1089,7 +1089,7 @@ tests: disabled: true - label: "DUT sends Get Holiday Day Schedule command to TH." - PICS: DRLK.S.F04 && DRLK.C.C12.Tx + PICS: DRLK.C.F04 && DRLK.C.C12.Tx verification: | ./chip-tool doorlock get-holiday-schedule 1 1 1 Verify the " Get Holiday Day Schedule command response" on TH(lock-app): @@ -1181,7 +1181,7 @@ tests: disabled: true - label: "DUT sends Clear Holiday Day Schedule command to TH." - PICS: DRLK.S.F04 && DRLK.C.C13.Tx + PICS: DRLK.C.F04 && DRLK.C.C13.Tx verification: | ./chip-tool doorlock clear-holiday-schedule 1 1 1 @@ -1271,7 +1271,7 @@ tests: disabled: true - label: "DUT sends Set USer command to TH." - PICS: DRLK.S.F08 && DRLK.C.C1a.Tx + PICS: DRLK.C.F08 && DRLK.C.C1a.Tx verification: | ./chip-tool doorlock set-user 0 2 xxx 6452 1 0 0 1 1 --timedInteractionTimeoutMs 1000 @@ -1373,7 +1373,7 @@ tests: disabled: true - label: "DUT sends Get User to TH." - PICS: DRLK.S.F08 && DRLK.C.C1b.Tx + PICS: DRLK.C.F08 && DRLK.C.C1b.Tx verification: | ./chip-tool doorlock get-user 2 1 1 --timedInteractionTimeoutMs 1000 Verify the " Get User Day Schedule command response" on TH(lock-app): @@ -1486,7 +1486,7 @@ tests: disabled: true - label: "DUT sends Clear User command to TH.a" - PICS: DRLK.S.F08 && DRLK.C.C1d.Tx + PICS: DRLK.C.F08 && DRLK.C.C1d.Tx verification: | ./chip-tool doorlock clear-user 2 1 1 --timedInteractionTimeoutMs 1000 Verify the " Clear User Day Schedule command response" on TH(lock-app): @@ -1582,7 +1582,7 @@ tests: disabled: true - label: "DUT sends Set Credential command to TH.a" - PICS: DRLK.S.F08 && DRLK.C.C22.Tx + PICS: DRLK.C.F08 && DRLK.C.C22.Tx verification: | ./chip-tool doorlock set-credential 0 '{ "credentialType" : 1 , "credentialIndex" : 1 }' 123456 1 0 0 1 1 --timedInteractionTimeoutMs 1000 @@ -1715,7 +1715,7 @@ tests: disabled: true - label: "DUT sends Get Credential to TH." - PICS: DRLK.S.F08 && DRLK.C.C24.Tx + PICS: DRLK.C.F08 && DRLK.C.C24.Tx verification: | ./chip-tool doorlock get-credential-status '{ "credentialType" : 1 , "credentialIndex" : 1 }' 1 1 --timedInteractionTimeoutMs 1000 Verify the " Get Credential command response" on TH(lock-app): @@ -1837,7 +1837,7 @@ tests: disabled: true - label: "DUT sends Clear Credential command to TH." - PICS: DRLK.S.F08 && DRLK.C.C26.Tx + PICS: DRLK.C.F08 && DRLK.C.C26.Tx verification: | ./chip-tool doorlock clear-credential '{ "credentialType" : 1 , "credentialIndex" : 1 }' 1 1 --timedInteractionTimeoutMs 1000 Verify the " Clear Credential command response" on TH(lock-app): diff --git a/src/app/tests/suites/certification/Test_TC_FLW_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_FLW_3_1.yaml similarity index 69% rename from src/app/tests/suites/certification/Test_TC_FLW_3_1_Simulated.yaml rename to src/app/tests/suites/certification/Test_TC_FLW_3_1.yaml index 6ab195a44dc9f3..ac626bd2ccb14e 100644 --- a/src/app/tests/suites/certification/Test_TC_FLW_3_1_Simulated.yaml +++ b/src/app/tests/suites/certification/Test_TC_FLW_3_1.yaml @@ -11,6 +11,7 @@ # 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: 31.3.1. [TC-FLW-3.1] Attributes with Client as DUT @@ -23,29 +24,182 @@ PICS: config: nodeId: 0x12344321 - cluster: "Flow Measurement" + cluster: "Basic Information" endpoint: 0 tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" + - label: "Note" + verification: | + For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. + + Commission TH(all-clusters-app) to TH(chip-tool) using below command + + TH(all-clusters-app) : sudo ./chip-all-clusters-app --trace_decode 1 + TH(chip-tool) : ./chip-tool pairing onnetwork 1 20202021 --trace_decode 1 + disabled: true + + - label: + "DUT reads all supported mandatory attributes from TH one at a time in + a manufacturer specific order." + PICS: FLW.C.AM-READ + verification: | + TH receives the read command and knows this attribute for this cluster and provides a plausable value, DUT processes the values and operates normally + + + ./chip-tool flowmeasurement read measured-value 1 1 + + Verify Measured-value attribute response on the TH(all-clusters-app) Log: + + ReportDataMessage = + [1666851206.054413][18793:18793] CHIP:DMG: { + [1666851206.054416][18793:18793] CHIP:DMG: AttributeReportIBs = + [1666851206.054421][18793:18793] CHIP:DMG: [ + [1666851206.054424][18793:18793] CHIP:DMG: AttributeReportIB = + [1666851206.054429][18793:18793] CHIP:DMG: { + [1666851206.054432][18793:18793] CHIP:DMG: AttributeDataIB = + [1666851206.054435][18793:18793] CHIP:DMG: { + [1666851206.054439][18793:18793] CHIP:DMG: DataVersion = 0x8435d808, + [1666851206.054442][18793:18793] CHIP:DMG: AttributePathIB = + [1666851206.054447][18793:18793] CHIP:DMG: { + [1666851206.054451][18793:18793] CHIP:DMG: Endpoint = 0x1, + [1666851206.054459][18793:18793] CHIP:DMG: Cluster = 0x404, + [1666851206.054462][18793:18793] CHIP:DMG: Attribute = 0x0000_0000, + [1666851206.054465][18793:18793] CHIP:DMG: } + [1666851206.054470][18793:18793] CHIP:DMG: + [1666851206.054473][18793:18793] CHIP:DMG: Data = 0, + [1666851206.054476][18793:18793] CHIP:DMG: }, + [1666851206.054480][18793:18793] CHIP:DMG: + [1666851206.054483][18793:18793] CHIP:DMG: }, + [1666851206.054487][18793:18793] CHIP:DMG: + [1666851206.054490][18793:18793] CHIP:DMG: ], + [1666851206.054495][18793:18793] CHIP:DMG: + [1666851206.054498][18793:18793] CHIP:DMG: SuppressResponse = true, + [1666851206.054501][18793:18793] CHIP:DMG: InteractionModelRevision = 1 + [1666851206.054503][18793:18793] CHIP:DMG: } + [1666851206.054507][18793:18793] CHIP:DMG: + + + + + ./chip-tool flowmeasurement read min-measured-value 1 1 + + Verify Min-measured-value attribute response on the TH(all-clusters-app) Log: + + ReportDataMessage = + [1666851246.809057][18793:18793] CHIP:DMG: { + [1666851246.809059][18793:18793] CHIP:DMG: AttributeReportIBs = + [1666851246.809065][18793:18793] CHIP:DMG: [ + [1666851246.809068][18793:18793] CHIP:DMG: AttributeReportIB = + [1666851246.809073][18793:18793] CHIP:DMG: { + [1666851246.809076][18793:18793] CHIP:DMG: AttributeDataIB = + [1666851246.809079][18793:18793] CHIP:DMG: { + [1666851246.809083][18793:18793] CHIP:DMG: DataVersion = 0x8435d808, + [1666851246.809086][18793:18793] CHIP:DMG: AttributePathIB = + [1666851246.809089][18793:18793] CHIP:DMG: { + [1666851246.809093][18793:18793] CHIP:DMG: Endpoint = 0x1, + [1666851246.809096][18793:18793] CHIP:DMG: Cluster = 0x404, + [1666851246.809100][18793:18793] CHIP:DMG: Attribute = 0x0000_0001, + [1666851246.809103][18793:18793] CHIP:DMG: } + [1666851246.809107][18793:18793] CHIP:DMG: + [1666851246.809111][18793:18793] CHIP:DMG: Data = 0, + [1666851246.809114][18793:18793] CHIP:DMG: }, + [1666851246.809119][18793:18793] CHIP:DMG: + [1666851246.809122][18793:18793] CHIP:DMG: }, + [1666851246.809128][18793:18793] CHIP:DMG: + [1666851246.809130][18793:18793] CHIP:DMG: ], + [1666851246.809134][18793:18793] CHIP:DMG: + [1666851246.809138][18793:18793] CHIP:DMG: SuppressResponse = true, + [1666851246.809141][18793:18793] CHIP:DMG: InteractionModelRevision = 1 + [1666851246.809143][18793:18793] CHIP:DMG: } + + + + ./chip-tool flowmeasurement read max-measured-value 1 1 - - label: "Read attribute: MeasuredValue" - wait: "readAttribute" - attribute: "MeasuredValue" + Verify Max-measured-value attribute response on the TH(all-clusters-app) Log: - - label: "Read attribute: MinMeasuredValue" - wait: "readAttribute" - attribute: "MinMeasuredValue" + ReportDataMessage = + [1666851281.851991][18793:18793] CHIP:DMG: { + [1666851281.851994][18793:18793] CHIP:DMG: AttributeReportIBs = + [1666851281.851999][18793:18793] CHIP:DMG: [ + [1666851281.852002][18793:18793] CHIP:DMG: AttributeReportIB = + [1666851281.852007][18793:18793] CHIP:DMG: { + [1666851281.852010][18793:18793] CHIP:DMG: AttributeDataIB = + [1666851281.852013][18793:18793] CHIP:DMG: { + [1666851281.852018][18793:18793] CHIP:DMG: DataVersion = 0x8435d808, + [1666851281.852021][18793:18793] CHIP:DMG: AttributePathIB = + [1666851281.852024][18793:18793] CHIP:DMG: { + [1666851281.852028][18793:18793] CHIP:DMG: Endpoint = 0x1, + [1666851281.852032][18793:18793] CHIP:DMG: Cluster = 0x404, + [1666851281.852036][18793:18793] CHIP:DMG: Attribute = 0x0000_0002, + [1666851281.852039][18793:18793] CHIP:DMG: } + [1666851281.852042][18793:18793] CHIP:DMG: + [1666851281.852046][18793:18793] CHIP:DMG: Data = 0, + [1666851281.852049][18793:18793] CHIP:DMG: }, + [1666851281.852054][18793:18793] CHIP:DMG: + [1666851281.852057][18793:18793] CHIP:DMG: }, + [1666851281.852061][18793:18793] CHIP:DMG: + [1666851281.852064][18793:18793] CHIP:DMG: ], + [1666851281.852068][18793:18793] CHIP:DMG: + [1666851281.852071][18793:18793] CHIP:DMG: SuppressResponse = true, + [1666851281.852074][18793:18793] CHIP:DMG: InteractionModelRevision = 1 + [1666851281.852076][18793:18793] CHIP:DMG: } + disabled: true - - label: "Read attribute: MaxMeasuredValue" - wait: "readAttribute" - attribute: "MaxMeasuredValue" + - label: + "DUT reads all supported optional attributes from TH one at a time in + a manufacturer specific order." + PICS: FLW.C.AO-READ + verification: | + TH receives the read command and knows this attribute for this cluster and provides a plausable value, DUT processes the values and operates normally - - label: "Read attribute: Tolerance" - wait: "readAttribute" - attribute: "Tolerance" + ./chip-tool flowmeasurement read tolerance 1 1 + + Verify Tolerence attribute response on the TH(all-clusters-app) Log: + + ReportDataMessage = + [1666851350.358919][18793:18793] CHIP:DMG: { + [1666851350.358921][18793:18793] CHIP:DMG: AttributeReportIBs = + [1666851350.358925][18793:18793] CHIP:DMG: [ + [1666851350.358928][18793:18793] CHIP:DMG: AttributeReportIB = + [1666851350.358933][18793:18793] CHIP:DMG: { + [1666851350.358936][18793:18793] CHIP:DMG: AttributeDataIB = + [1666851350.358939][18793:18793] CHIP:DMG: { + [1666851350.358943][18793:18793] CHIP:DMG: DataVersion = 0x8435d808, + [1666851350.358946][18793:18793] CHIP:DMG: AttributePathIB = + [1666851350.358949][18793:18793] CHIP:DMG: { + [1666851350.358953][18793:18793] CHIP:DMG: Endpoint = 0x1, + [1666851350.358956][18793:18793] CHIP:DMG: Cluster = 0x404, + [1666851350.358960][18793:18793] CHIP:DMG: Attribute = 0x0000_0003, + [1666851350.358963][18793:18793] CHIP:DMG: } + [1666851350.358967][18793:18793] CHIP:DMG: + [1666851350.358971][18793:18793] CHIP:DMG: Data = 0, + [1666851350.358974][18793:18793] CHIP:DMG: }, + [1666851350.358979][18793:18793] CHIP:DMG: + [1666851350.358982][18793:18793] CHIP:DMG: }, + [1666851350.358986][18793:18793] CHIP:DMG: + [1666851350.358989][18793:18793] CHIP:DMG: ], + [1666851350.358994][18793:18793] CHIP:DMG: + [1666851350.358997][18793:18793] CHIP:DMG: SuppressResponse = true, + [1666851350.359000][18793:18793] CHIP:DMG: InteractionModelRevision = 1 + [1666851350.359003][18793:18793] CHIP:DMG: } + disabled: true + + - label: + "DUT writes a suitable value to all supported mandatory attributes on + the TH one at a time in a manufacturer specific order." + PICS: FLW.C.AM-WRITE + verification: | + This cluster doesn"t have any writable attributes + disabled: true + + - label: + "DUT writes a suitable value to all supported optional attributes on + the TH one at a time in a manufacturer specific order." + PICS: FLW.C.AO-WRITE + verification: | + This cluster doesn"t have any writable attributes + disabled: true - label: "Configure TH such that it implements mandatory and none of the @@ -267,6 +421,8 @@ tests: [1666851643.847294][18927:18927] CHIP:DMG: } + + ./chip-tool flowmeasurement read measured-value 1 1 Verify MeasuredValue response on the TH(all-clusters-minimal-app) Log: @@ -300,6 +456,8 @@ tests: + + ./chip-tool flowmeasurement read min-measured-value 1 1 Verify MinMeasuredValue response on the TH(all-clusters-minimal-app) Log: @@ -332,6 +490,7 @@ tests: [1666851700.451681][18927:18927] CHIP:DMG: } + ./chip-tool flowmeasurement read max-measured-value 1 1 Verify MaxMeasured Value response on the TH(all-clusters-minimal-app) Log: @@ -362,19 +521,12 @@ tests: [1666851727.140290][18927:18927] CHIP:DMG: SuppressResponse = true, [1666851727.140295][18927:18927] CHIP:DMG: InteractionModelRevision = 1 [1666851727.140298][18927:18927] CHIP:DMG: } - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" + disabled: true - label: "DUT reads all supported optional attributes from TH one at a time in - a manufacturer specific order" + a manufacturer specific order." + PICS: FLW.C.AO-READ verification: | Verify TH(all-clusters-minimal-app) receives the read command, and responds that this attribute is not available and also DUT is aware that the optional attributes are not available, and does not issue read requests for the attributes which it did read in step 2 @@ -384,28 +536,13 @@ tests: Verify Tolerance response on the TH(all-clusters-minimal-app) Log: on TH all-clusters-minimal-app verify status response a UNSUPPORTED_ATTRIBUTE - General error: 0x86 (UNSUPPORTED_ATTRIBUTE) - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" + General error: 0x86 (UNSUPPORTED_ATTRIBUTE) + disabled: true - label: "DUT writes a suitable value to all supported optional attributes on - the TH one at a time in a manufacturer specific order" + the TH one at a time in a manufacturer specific order." + PICS: FLW.C.AO-WRITE verification: | - This cluster doesn't have any writable attributes - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" + This cluster doesn"t have any writable attributes + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_G_2_3.yaml b/src/app/tests/suites/certification/Test_TC_G_2_3.yaml index 6abeafc4e6d379..5d28c8daa6eb8d 100644 --- a/src/app/tests/suites/certification/Test_TC_G_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_G_2_3.yaml @@ -589,7 +589,7 @@ tests: verification: | ./chip-tool groupkeymanagement read group-table 1 0 - Verify the "grouptable" does not have GroupName Gp9 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: + Verify the "grouptable" does not have GroupName gp5 on the TH(Chip-tool) Log and below is the sample log provided for the raspi platform: [1674552384.204664][21058:21060] CHIP:DMG: } [1674552384.204841][21058:21060] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003F Attribute 0x0000_0001 DataVersion: 1314349292 diff --git a/src/app/tests/suites/certification/Test_TC_IDM_3_1.yaml b/src/app/tests/suites/certification/Test_TC_IDM_3_1.yaml index 0032ec5c266846..dfcdc7dca0854c 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_3_1.yaml @@ -13,7 +13,7 @@ # limitations under the License. # Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default -name: 3.3.1. [TC-IDM-3.1] Write Request Action from DUT to TH. [{DUT_Client}] +name: 3.3.1. [TC-IDM-3.1] Write Request Action from DUT to TH. [DUT Client] PICS: - MCORE.IDM.C.WriteRequest @@ -299,7 +299,8 @@ tests: [1657884155.222229][2865:2870] CHIP:DMG: WriteClient moving to [AwaitingDe] - ./chip-tool basic read node-label 1 0 + ./chip-tool basicinformation read node-label 1 0 + verify on TH(reference app) receives the right write Request Message for the data sent in the above command [1657884173.738798][2748:2748] CHIP:IM: Received Read request [1657884173.738877][2748:2748] CHIP:DMG: ReadRequestMessage = diff --git a/src/app/tests/suites/certification/Test_TC_I_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_I_3_1.yaml similarity index 64% rename from src/app/tests/suites/certification/Test_TC_I_3_1_Simulated.yaml rename to src/app/tests/suites/certification/Test_TC_I_3_1.yaml index 7b24a5f5560e29..7fcf187bef0506 100644 --- a/src/app/tests/suites/certification/Test_TC_I_3_1_Simulated.yaml +++ b/src/app/tests/suites/certification/Test_TC_I_3_1.yaml @@ -11,45 +11,290 @@ # 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: 59.3.1. [TC-I-3.1] Attributes with Client as DUT +name: 59.3.1 [TC-I-3.1] Attributes with client as DUT" PICS: - I.C config: nodeId: 0x12344321 - cluster: "Identify" - endpoint: 1 + cluster: "Basic Information" + endpoint: 0 tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" + - label: "Note" + verification: | + For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. + disabled: true + + - label: + "DUT reads all supported mandatory attributes from TH one at a time in + a manufacturer specific order" + PICS: I.C.AM-READ + verification: | + Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) + ./chip-tool identify read identify-time 1 1 + Verify DUT receives identify-time attribute response on the TH(all-clusters-app) Log: - - label: "Read attribute: IdentifyTime" - wait: "readAttribute" - attribute: "IdentifyTime" + [1667197830.806071][11363:11363] CHIP:EM: Handling via exchange: 56765r, Delegate: 0xaaaac34e82d8 + [1667197830.806175][11363:11363] CHIP:IM: Received Read request + [1667197830.806352][11363:11363] CHIP:DMG: ReadRequestMessage = + [1667197830.806419][11363:11363] CHIP:DMG: { + [1667197830.806530][11363:11363] CHIP:DMG: AttributePathIBs = + [1667197830.806600][11363:11363] CHIP:DMG: [ + [1667197830.806661][11363:11363] CHIP:DMG: AttributePathIB = + [1667197830.806731][11363:11363] CHIP:DMG: { + [1667197830.806797][11363:11363] CHIP:DMG: Endpoint = 0x1, + [1667197830.806879][11363:11363] CHIP:DMG: Cluster = 0x3, + [1667197830.806961][11363:11363] CHIP:DMG: Attribute = 0x0000_0000, + [1667197830.807024][11363:11363] CHIP:DMG: } + [1667197830.807095][11363:11363] CHIP:DMG: + [1667197830.807167][11363:11363] CHIP:DMG: ], + [1667197830.807238][11363:11363] CHIP:DMG: + [1667197830.807307][11363:11363] CHIP:DMG: isFabricFiltered = true, + [1667197830.807371][11363:11363] CHIP:DMG: InteractionModelRevision = 1 + [1667197830.807430][11363:11363] CHIP:DMG: }, + [1667197830.807585][11363:11363] CHIP:DMG: IM RH moving to [GeneratingReports] + [1667197830.807839][11363:11363] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1667197830.807916][11363:11363] CHIP:DMG: Cluster 3, Attribute 0 is dirty + [1667197830.807974][11363:11363] CHIP:DMG: Reading attribute: Cluster=0x0000_0003 Endpoint=1 AttributeId=0x0000_0000 (expanded=0) + [1667197830.808039][11363:11363] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0003 e=1 p=v + [1667197830.808111][11363:11363] CHIP:DMG: AccessControl: allowed + [1667197830.808227][11363:11363] CHIP:DMG: Sending report (payload has 36 bytes)... + [1667197830.808823][11363:11363] CHIP:EM: <<< [E:56765r M:6967774 (Ack:173797668)] (S) Msg TX to 1:000000000001B669 [CA2D] --- Type 0001:05 (IM:ReportData) + [1667197830.808936][11363:11363] CHIP:IN: (S) Sending msg 6967774 on secure session with LSID: 9654 + [1667197830.809642][11363:11363] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%wlan0]:52355 | 6967774 | [Interaction Model (1) / Report Data (0x05) / Session = 43830 / Exchange = 56765] + [1667197830.809747][11363:11363] CHIP:DMG: Header Flags = + [1667197830.809804][11363:11363] CHIP:DMG: { + [1667197830.809890][11363:11363] CHIP:DMG: Exchange (0x06) = + [1667197830.809952][11363:11363] CHIP:DMG: { + [1667197830.810010][11363:11363] CHIP:DMG: AckMsg = 173797668 + [1667197830.810068][11363:11363] CHIP:DMG: NeedsAck = true + [1667197830.810121][11363:11363] CHIP:DMG: } + [1667197830.810186][11363:11363] CHIP:DMG: } + [1667197830.810240][11363:11363] CHIP:DMG: + [1667197830.810303][11363:11363] CHIP:DMG: Encrypted Payload (70 bytes) = + [1667197830.810358][11363:11363] CHIP:DMG: { + [1667197830.810405][11363:11363] CHIP:DMG: data = 0036ab00de516a0096089f5f069615098a38a1c6fa532c8d77d16800b7f79686515c05356b16d262e260f3353fe22483dd5f6b40756b8f04c722cd94cd51ef2be041cee4d0fb + [1667197830.810511][11363:11363] CHIP:DMG: buffer_ptr = 187650850782464 + [1667197830.810563][11363:11363] CHIP:DMG: } + [1667197830.810607][11363:11363] CHIP:DMG: + [1667197830.810687][11363:11363] CHIP:DMG: Decrypted Payload (36 bytes) = + [1667197830.810743][11363:11363] CHIP:DMG: { + [1667197830.810796][11363:11363] CHIP:DMG: data = 15360115350126003d7b1cd3370124020124030324040018240200181818290424ff0118 + [1667197830.810850][11363:11363] CHIP:DMG: } + [1667197830.810902][11363:11363] CHIP:DMG: + [1667197830.811053][11363:11363] CHIP:DMG: ReportDataMessage = + [1667197830.811121][11363:11363] CHIP:DMG: { + [1667197830.811176][11363:11363] CHIP:DMG: AttributeReportIBs = + [1667197830.811261][11363:11363] CHIP:DMG: [ + [1667197830.811325][11363:11363] CHIP:DMG: AttributeReportIB = + [1667197830.811424][11363:11363] CHIP:DMG: { + [1667197830.811500][11363:11363] CHIP:DMG: AttributeDataIB = + [1667197830.811589][11363:11363] CHIP:DMG: { + [1667197830.811683][11363:11363] CHIP:DMG: DataVersion = 0xd31c7b3d, + [1667197830.811775][11363:11363] CHIP:DMG: AttributePathIB = + [1667197830.811868][11363:11363] CHIP:DMG: { + [1667197830.811943][11363:11363] CHIP:DMG: Endpoint = 0x1, + [1667197830.812043][11363:11363] CHIP:DMG: Cluster = 0x3, + [1667197830.812143][11363:11363] CHIP:DMG: Attribute = 0x0000_0000, + [1667197830.812237][11363:11363] CHIP:DMG: } + [1667197830.812321][11363:11363] CHIP:DMG: + [1667197830.812423][11363:11363] CHIP:DMG: Data = 0, + [1667197830.812512][11363:11363] CHIP:DMG: }, + [1667197830.812609][11363:11363] CHIP:DMG: + [1667197830.812682][11363:11363] CHIP:DMG: }, + [1667197830.812759][11363:11363] CHIP:DMG: + [1667197830.812819][11363:11363] CHIP:DMG: ], - - label: "write attribute: IdentifyTime" - wait: "writeAttribute" - attribute: "IdentifyTime" - arguments: - value: - - label: "Readback attribute: IdentifyTime" - wait: "readAttribute" - attribute: "IdentifyTime" - - label: "Read attribute: identifytype" - wait: "readAttribute" - attribute: "IdentifyType" + ./chip-tool identify read identify-type 1 1 + Verify DUT receives identify-type attribute response on the TH(all-clusters-app) Log: + + [1667197859.375557][11363:11363] CHIP:EM: Handling via exchange: 38348r, Delegate: 0xaaaac34e82d8 + [1667197859.375655][11363:11363] CHIP:IM: Received Read request + [1667197859.375832][11363:11363] CHIP:DMG: ReadRequestMessage = + [1667197859.375906][11363:11363] CHIP:DMG: { + [1667197859.375961][11363:11363] CHIP:DMG: AttributePathIBs = + [1667197859.376027][11363:11363] CHIP:DMG: [ + [1667197859.376088][11363:11363] CHIP:DMG: AttributePathIB = + [1667197859.376160][11363:11363] CHIP:DMG: { + [1667197859.376231][11363:11363] CHIP:DMG: Endpoint = 0x1, + [1667197859.376307][11363:11363] CHIP:DMG: Cluster = 0x3, + [1667197859.376381][11363:11363] CHIP:DMG: Attribute = 0x0000_0001, + [1667197859.376452][11363:11363] CHIP:DMG: } + [1667197859.376519][11363:11363] CHIP:DMG: + [1667197859.376585][11363:11363] CHIP:DMG: ], + [1667197859.376653][11363:11363] CHIP:DMG: + [1667197859.376719][11363:11363] CHIP:DMG: isFabricFiltered = true, + [1667197859.376784][11363:11363] CHIP:DMG: InteractionModelRevision = 1 + [1667197859.376839][11363:11363] CHIP:DMG: }, + [1667197859.376995][11363:11363] CHIP:DMG: IM RH moving to [GeneratingReports] + [1667197859.377225][11363:11363] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1667197859.377298][11363:11363] CHIP:DMG: Cluster 3, Attribute 1 is dirty + [1667197859.377353][11363:11363] CHIP:DMG: Reading attribute: Cluster=0x0000_0003 Endpoint=1 AttributeId=0x0000_0001 (expanded=0) + [1667197859.377419][11363:11363] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0003 e=1 p=v + [1667197859.377496][11363:11363] CHIP:DMG: AccessControl: allowed + [1667197859.377611][11363:11363] CHIP:DMG: Sending report (payload has 36 bytes)... + [1667197859.378153][11363:11363] CHIP:EM: <<< [E:38348r M:20924532 (Ack:202726318)] (S) Msg TX to 1:000000000001B669 [CA2D] --- Type 0001:05 (IM:ReportData) + [1667197859.378254][11363:11363] CHIP:IN: (S) Sending msg 20924532 on secure session with LSID: 9655 + [1667197859.379039][11363:11363] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%wlan0]:52145 | 20924532 | [Interaction Model (1) / Report Data (0x05) / Session = 47641 / Exchange = 38348] + [1667197859.379137][11363:11363] CHIP:DMG: Header Flags = + [1667197859.379194][11363:11363] CHIP:DMG: { + [1667197859.379279][11363:11363] CHIP:DMG: Exchange (0x06) = + [1667197859.379335][11363:11363] CHIP:DMG: { + [1667197859.379393][11363:11363] CHIP:DMG: AckMsg = 202726318 + [1667197859.379443][11363:11363] CHIP:DMG: NeedsAck = true + [1667197859.379495][11363:11363] CHIP:DMG: } + [1667197859.379566][11363:11363] CHIP:DMG: } + [1667197859.379615][11363:11363] CHIP:DMG: + [1667197859.379678][11363:11363] CHIP:DMG: Encrypted Payload (70 bytes) = + [1667197859.379734][11363:11363] CHIP:DMG: { + [1667197859.379794][11363:11363] CHIP:DMG: data = 0019ba0074483f0113bf2b670f0c16ac4bf0449c61e3667276e5e90cc89b7aa151eb95f884bd682f00aa2515b2e0f215744f9e9677a24a81038ed41be9807175d710f56b9eb4 + [1667197859.379852][11363:11363] CHIP:DMG: buffer_ptr = 187650850785568 + [1667197859.379905][11363:11363] CHIP:DMG: } + [1667197859.379956][11363:11363] CHIP:DMG: + [1667197859.380036][11363:11363] CHIP:DMG: Decrypted Payload (36 bytes) = + [1667197859.380092][11363:11363] CHIP:DMG: { + [1667197859.380140][11363:11363] CHIP:DMG: data = 15360115350126003d7b1cd3370124020124030324040118240202181818290424ff0118 + [1667197859.380194][11363:11363] CHIP:DMG: } + [1667197859.380245][11363:11363] CHIP:DMG: + [1667197859.380391][11363:11363] CHIP:DMG: ReportDataMessage = + [1667197859.380449][11363:11363] CHIP:DMG: { + [1667197859.380503][11363:11363] CHIP:DMG: AttributeReportIBs = + [1667197859.380574][11363:11363] CHIP:DMG: [ + [1667197859.380636][11363:11363] CHIP:DMG: AttributeReportIB = + [1667197859.380725][11363:11363] CHIP:DMG: { + [1667197859.380786][11363:11363] CHIP:DMG: AttributeDataIB = + [1667197859.380869][11363:11363] CHIP:DMG: { + [1667197859.380956][11363:11363] CHIP:DMG: DataVersion = 0xd31c7b3d, + [1667197859.381038][11363:11363] CHIP:DMG: AttributePathIB = + [1667197859.381124][11363:11363] CHIP:DMG: { + [1667197859.381208][11363:11363] CHIP:DMG: Endpoint = 0x1, + [1667197859.381299][11363:11363] CHIP:DMG: Cluster = 0x3, + [1667197859.381390][11363:11363] CHIP:DMG: Attribute = 0x0000_0001, + [1667197859.381475][11363:11363] CHIP:DMG: } + [1667197859.381564][11363:11363] CHIP:DMG: + [1667197859.381642][11363:11363] CHIP:DMG: Data = 2, + [1667197859.381721][11363:11363] CHIP:DMG: }, + [1667197859.381808][11363:11363] CHIP:DMG: + [1667197859.381881][11363:11363] CHIP:DMG: }, + [1667197859.381965][11363:11363] CHIP:DMG: + [1667197859.382021][11363:11363] CHIP:DMG: ], + disabled: true + + - label: + "DUT reads all supported optional attributes from TH one at a time in + a manufacturer specific order" + PICS: I.C.AM-READ + verification: | + There is no optional attribute for this cluster + disabled: true + + - label: + "DUT writes a suitable value to all supported mandatory attributes on + the TH one at a time in a manufacturer specific order" + PICS: I.C.AM-WRITE + verification: | + Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) + + ./chip-tool identify write identify-time 1 1 1 + + Verify DUT receives identify-time attribute write response on the TH(all-clusters-app) Log: + + [1667197889.479496][11363:11363] CHIP:EM: Handling via exchange: 31391r, Delegate: 0xaaaac34e82d8 + [1667197889.479607][11363:11363] CHIP:IM: Received Write request + [1667197889.479667][11363:11363] CHIP:DMG: IM WH moving to [Initialized] + [1667197889.479793][11363:11363] CHIP:DMG: WriteRequestMessage = + [1667197889.479861][11363:11363] CHIP:DMG: { + [1667197889.479914][11363:11363] CHIP:DMG: suppressResponse = false, + [1667197889.480046][11363:11363] CHIP:DMG: timedRequest = false, + [1667197889.480118][11363:11363] CHIP:DMG: AttributeDataIBs = + [1667197889.480194][11363:11363] CHIP:DMG: [ + [1667197889.480257][11363:11363] CHIP:DMG: AttributeDataIB = + [1667197889.480338][11363:11363] CHIP:DMG: { + [1667197889.480403][11363:11363] CHIP:DMG: AttributePathIB = + [1667197889.480476][11363:11363] CHIP:DMG: { + [1667197889.480558][11363:11363] CHIP:DMG: Endpoint = 0x1, + [1667197889.480726][11363:11363] CHIP:DMG: Cluster = 0x3, + [1667197889.480833][11363:11363] CHIP:DMG: Attribute = 0x0000_0000, + [1667197889.480917][11363:11363] CHIP:DMG: } + [1667197889.481002][11363:11363] CHIP:DMG: + [1667197889.481079][11363:11363] CHIP:DMG: Data = 1, + [1667197889.481159][11363:11363] CHIP:DMG: }, + [1667197889.481233][11363:11363] CHIP:DMG: + [1667197889.481362][11363:11363] CHIP:DMG: ], + [1667197889.481450][11363:11363] CHIP:DMG: + [1667197889.481515][11363:11363] CHIP:DMG: moreChunkedMessages = false, + [1667197889.481573][11363:11363] CHIP:DMG: InteractionModelRevision = 1 + [1667197889.481633][11363:11363] CHIP:DMG: }, + [1667197889.481808][11363:11363] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0003 e=1 p=o + [1667197889.481968][11363:11363] CHIP:DMG: AccessControl: allowed + [1667197889.482051][11363:11363] CHIP:DMG: Endpoint 1, Cluster 0x0000_0003 update version to d31c7b3e + [1667197889.482118][11363:11363] CHIP:ZCL: OnIdentifyStart + [1667197889.482209][11363:11363] CHIP:DMG: IM WH moving to [AddStatus] + [1667197889.482993][11363:11363] CHIP:EM: <<< [E:31391r M:223916494 (Ack:146608348)] (S) Msg TX to 1:000000000001B669 [CA2D] --- Type 0001:07 (IM:WriteResponse) + [1667197889.483099][11363:11363] CHIP:IN: (S) Sending msg 223916494 on secure session with LSID: 9656 + [1667197889.483768][11363:11363] CHIP:DMG: >> to UDP:[fe80::e65f:1ff:fe0e:be37%wlan0]:45332 | 223916494 | [Interaction Model (1) / Write Response (0x07) / Session = 31614 / Exchange = 31391] + [1667197889.483866][11363:11363] CHIP:DMG: Header Flags = + [1667197889.483924][11363:11363] CHIP:DMG: { + [1667197889.484008][11363:11363] CHIP:DMG: Exchange (0x06) = + [1667197889.484066][11363:11363] CHIP:DMG: { + [1667197889.484124][11363:11363] CHIP:DMG: AckMsg = 146608348 + [1667197889.484179][11363:11363] CHIP:DMG: NeedsAck = true + [1667197889.484232][11363:11363] CHIP:DMG: } + [1667197889.484300][11363:11363] CHIP:DMG: } + [1667197889.484357][11363:11363] CHIP:DMG: + [1667197889.484425][11363:11363] CHIP:DMG: Encrypted Payload (62 bytes) = + [1667197889.484486][11363:11363] CHIP:DMG: { + [1667197889.484540][11363:11363] CHIP:DMG: data = 007e7b00ceb1580ddff6af479435aed76f0c0ccbb0373bc29813965e087ca53358ce3dffd80c89948d2b8e5e3a6b982db9b3ee4cd20c25bcaae22a456b04 + [1667197889.484602][11363:11363] CHIP:DMG: buffer_ptr = 187650850784800 + [1667197889.484656][11363:11363] CHIP:DMG: } + [1667197889.484701][11363:11363] CHIP:DMG: + [1667197889.484779][11363:11363] CHIP:DMG: Decrypted Payload (28 bytes) = + [1667197889.484829][11363:11363] CHIP:DMG: { + [1667197889.484886][11363:11363] CHIP:DMG: data = 15360015370024020124030324040018350124000018181824ff0118 + [1667197889.484941][11363:11363] CHIP:DMG: } + [1667197889.484992][11363:11363] CHIP:DMG: + [1667197889.485093][11363:11363] CHIP:DMG: WriteResponseMessage = + [1667197889.485160][11363:11363] CHIP:DMG: { + [1667197889.485209][11363:11363] CHIP:DMG: AttributeStatusIBs = + [1667197889.485284][11363:11363] CHIP:DMG: [ + [1667197889.485340][11363:11363] CHIP:DMG: AttributeStatusIB = + [1667197889.485417][11363:11363] CHIP:DMG: { + [1667197889.485483][11363:11363] CHIP:DMG: AttributePathIB = + [1667197889.485551][11363:11363] CHIP:DMG: { + [1667197889.485627][11363:11363] CHIP:DMG: Endpoint = 0x1, + [1667197889.485724][11363:11363] CHIP:DMG: Cluster = 0x3, + [1667197889.485802][11363:11363] CHIP:DMG: Attribute = 0x0000_0000, + [1667197889.485867][11363:11363] CHIP:DMG: } + [1667197889.485957][11363:11363] CHIP:DMG: + [1667197889.486038][11363:11363] CHIP:DMG: StatusIB = + [1667197889.486117][11363:11363] CHIP:DMG: { + [1667197889.486190][11363:11363] CHIP:DMG: status = 0x00 (SUCCESS), + [1667197889.486279][11363:11363] CHIP:DMG: }, + [1667197889.486360][11363:11363] CHIP:DMG: + [1667197889.486427][11363:11363] CHIP:DMG: }, + [1667197889.486540][11363:11363] CHIP:DMG: + [1667197889.486604][11363:11363] CHIP:DMG: ], + disabled: true + + - label: + "DUT writes a suitable value to all supported optional attributes on + the TH one at a time in a manufacturer specific order" + PICS: I.C.AO-WRITE + verification: | + There is no write optional attribute for this cluster + disabled: true - label: "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the cluster, and that it also reflects this in global attributes such as FeatureMap and - AttributeList.Commission DUT to TH again" + AttributeList. Commission DUT to TH again" verification: | Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) @@ -401,7 +646,7 @@ tests: - ./chip-tool identify read identify-type 1 1 + ./chip-tool identify read identify-type 1 1 Verify DUT receives identify-type attribute response on theTH(all-clusters-minimal-app) [1667198289.735862][11390:11390] CHIP:EM: Handling via exchange: 64741r, Delegate: 0xaaaaad555148 @@ -474,42 +719,20 @@ tests: [1667198289.742180][11390:11390] CHIP:DMG: }, [1667198289.742256][11390:11390] CHIP:DMG: [1667198289.742317][11390:11390] CHIP:DMG: ], - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" + disabled: true - label: "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order" + PICS: I.C.AO-READ verification: | There is no optional attribute for this cluster - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" + disabled: true - label: "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer specific order" + PICS: I.C.AO-WRITE verification: | - This cluster doesn't have any writable attributes - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" + There is no optional write attribute for this cluster + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml index 28fd797de4d4c7..7d55c2b432daa6 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml @@ -60,6 +60,14 @@ tests: arguments: value: 0 + #NOTE - fix/workaround for https://github.com/CHIP-Specifications/chip-test-plans/issues/2176 + - label: "TH writes NULL to the OnLevel attribute" + PICS: LVL.S.A0011 + command: "writeAttribute" + attribute: "OnLevel" + arguments: + value: null + - label: "TH sends Off command to DUT" cluster: "On/Off" PICS: LVL.S.C04.Rsp && OO.S.C00.Rsp diff --git a/src/app/tests/suites/certification/Test_TC_MC_11_1.yaml b/src/app/tests/suites/certification/Test_TC_MC_11_1.yaml index 9309eb62b55d8d..b43b6b73853aad 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_11_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_11_1.yaml @@ -118,6 +118,8 @@ tests: verification: | Into the shell, enter "cast cluster descriptor read device-type-list 0 4" to read the device list of the descriptor cluster on endpoint 4 + Descriptor cluster is supporting endpoint 1 and 2 in RPI platform hence if TH tried to read the device list of the descriptor cluster on endpoint 4 from the DUT, DUT should send the response as UNSUPPORTED_ENDPOINT, + It may vary based the DUT > cast cluster descriptor read device-type-list 0 4 .... [1653180214397] [48426:1919098] CHIP: [TOO] Endpoint: 6 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 4094146641 diff --git a/src/app/tests/suites/certification/Test_TC_MC_11_2.yaml b/src/app/tests/suites/certification/Test_TC_MC_11_2.yaml index 181d1637b5d803..5f1add558f194e 100644 --- a/src/app/tests/suites/certification/Test_TC_MC_11_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_MC_11_2.yaml @@ -122,7 +122,9 @@ tests: - label: "TH reads the endpoints from the DUT" verification: | Into the shell, enter "cast cluster descriptor read device-list 0 4" to read the device list of the descriptor cluster on endpoint 4 + Descriptor cluster is supporting endpoint 1 and 2 in RPI platform hence if TH tried to read the device list of the descriptor cluster on endpoint 4 from the DUT, DUT should send the response as UNSUPPORTED_ENDPOINT, + It may vary based the DUT > cast cluster descriptor read device-type-list 0 4 .... [1653180214397] [48426:1919098] CHIP: [TOO] Endpoint: 6 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 4094146641 diff --git a/src/app/tests/suites/certification/Test_TC_MOD_1_3.yaml b/src/app/tests/suites/certification/Test_TC_MOD_1_3.yaml index b67b5a792abe70..051deee2d21efb 100644 --- a/src/app/tests/suites/certification/Test_TC_MOD_1_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_MOD_1_3.yaml @@ -390,290 +390,437 @@ tests: verification: | ./chip-tool modeselect read attribute-list 1 1 - verify the "attribute-list response" on the TH (all-cluster-minimal-app) log: - - [1666943275.315331][12769:12769] CHIP:DMG: - [1666943275.315365][12769:12769] CHIP:DMG: ReportDataMessage = - [1666943275.315367][12769:12769] CHIP:DMG: { - [1666943275.315369][12769:12769] CHIP:DMG: AttributeReportIBs = - [1666943275.315372][12769:12769] CHIP:DMG: [ - [1666943275.315374][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943275.315377][12769:12769] CHIP:DMG: { - [1666943275.315379][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943275.315383][12769:12769] CHIP:DMG: { - [1666943275.315386][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, - [1666943275.315388][12769:12769] CHIP:DMG: AttributePathIB = - [1666943275.315390][12769:12769] CHIP:DMG: { - [1666943275.315394][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943275.315397][12769:12769] CHIP:DMG: Cluster = 0x50, - [1666943275.315399][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666943275.315401][12769:12769] CHIP:DMG: } - [1666943275.315404][12769:12769] CHIP:DMG: - [1666943275.315406][12769:12769] CHIP:DMG: Data = [ - [1666943275.315409][12769:12769] CHIP:DMG: - [1666943275.315411][12769:12769] CHIP:DMG: ], - [1666943275.315413][12769:12769] CHIP:DMG: }, - [1666943275.315416][12769:12769] CHIP:DMG: - [1666943275.315418][12769:12769] CHIP:DMG: }, - [1666943275.315423][12769:12769] CHIP:DMG: - [1666943275.315424][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943275.315429][12769:12769] CHIP:DMG: { - [1666943275.315431][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943275.315434][12769:12769] CHIP:DMG: { - [1666943275.315436][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, - [1666943275.315438][12769:12769] CHIP:DMG: AttributePathIB = - [1666943275.315440][12769:12769] CHIP:DMG: { - [1666943275.315443][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943275.315445][12769:12769] CHIP:DMG: Cluster = 0x50, - [1666943275.315448][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666943275.315450][12769:12769] CHIP:DMG: ListIndex = Null, - [1666943275.315452][12769:12769] CHIP:DMG: } - [1666943275.315455][12769:12769] CHIP:DMG: - [1666943275.315457][12769:12769] CHIP:DMG: Data = 0, - [1666943275.315459][12769:12769] CHIP:DMG: }, - [1666943275.315462][12769:12769] CHIP:DMG: - [1666943275.315464][12769:12769] CHIP:DMG: }, - [1666943275.315469][12769:12769] CHIP:DMG: - [1666943275.315470][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943275.315474][12769:12769] CHIP:DMG: { - [1666943275.315476][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943275.315478][12769:12769] CHIP:DMG: { - [1666943275.315481][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, - [1666943275.315483][12769:12769] CHIP:DMG: AttributePathIB = - [1666943275.315485][12769:12769] CHIP:DMG: { - [1666943275.315487][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943275.315490][12769:12769] CHIP:DMG: Cluster = 0x50, - [1666943275.315492][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666943275.315494][12769:12769] CHIP:DMG: ListIndex = Null, - [1666943275.315497][12769:12769] CHIP:DMG: } - [1666943275.315499][12769:12769] CHIP:DMG: - [1666943275.315501][12769:12769] CHIP:DMG: Data = 1, - [1666943275.315504][12769:12769] CHIP:DMG: }, - [1666943275.315506][12769:12769] CHIP:DMG: - [1666943275.315508][12769:12769] CHIP:DMG: }, - [1666943275.315512][12769:12769] CHIP:DMG: - [1666943275.315514][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943275.315518][12769:12769] CHIP:DMG: { - [1666943275.315519][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943275.315522][12769:12769] CHIP:DMG: { - [1666943275.315524][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, - [1666943275.315526][12769:12769] CHIP:DMG: AttributePathIB = - [1666943275.315530][12769:12769] CHIP:DMG: { - [1666943275.315532][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943275.315534][12769:12769] CHIP:DMG: Cluster = 0x50, - [1666943275.315537][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666943275.315539][12769:12769] CHIP:DMG: ListIndex = Null, - [1666943275.315541][12769:12769] CHIP:DMG: } - [1666943275.315543][12769:12769] CHIP:DMG: - [1666943275.315546][12769:12769] CHIP:DMG: Data = 2, - [1666943275.315548][12769:12769] CHIP:DMG: }, - [1666943275.315551][12769:12769] CHIP:DMG: - [1666943275.315553][12769:12769] CHIP:DMG: }, - [1666943275.315558][12769:12769] CHIP:DMG: - [1666943275.315560][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943275.315564][12769:12769] CHIP:DMG: { - [1666943275.315566][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943275.315568][12769:12769] CHIP:DMG: { - [1666943275.315571][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, - [1666943275.315573][12769:12769] CHIP:DMG: AttributePathIB = - [1666943275.315575][12769:12769] CHIP:DMG: { - [1666943275.315577][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943275.315580][12769:12769] CHIP:DMG: Cluster = 0x50, - [1666943275.315582][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666943275.315585][12769:12769] CHIP:DMG: ListIndex = Null, - [1666943275.315587][12769:12769] CHIP:DMG: } - [1666943275.315590][12769:12769] CHIP:DMG: - [1666943275.315592][12769:12769] CHIP:DMG: Data = 3, - [1666943275.315594][12769:12769] CHIP:DMG: }, - [1666943275.315597][12769:12769] CHIP:DMG: - [1666943275.315599][12769:12769] CHIP:DMG: }, - [1666943275.315604][12769:12769] CHIP:DMG: - [1666943275.315605][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943275.315609][12769:12769] CHIP:DMG: { - [1666943275.315611][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943275.315613][12769:12769] CHIP:DMG: { - [1666943275.315616][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, - [1666943275.315617][12769:12769] CHIP:DMG: AttributePathIB = - [1666943275.315621][12769:12769] CHIP:DMG: { - [1666943275.315623][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943275.315625][12769:12769] CHIP:DMG: Cluster = 0x50, - [1666943275.315628][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666943275.315630][12769:12769] CHIP:DMG: ListIndex = Null, - [1666943275.315632][12769:12769] CHIP:DMG: } - [1666943275.315635][12769:12769] CHIP:DMG: - [1666943275.315637][12769:12769] CHIP:DMG: Data = 65528, - [1666943275.315639][12769:12769] CHIP:DMG: }, - [1666943275.315642][12769:12769] CHIP:DMG: - [1666943275.315644][12769:12769] CHIP:DMG: }, - [1666943275.315648][12769:12769] CHIP:DMG: - [1666943275.315650][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943275.315654][12769:12769] CHIP:DMG: { - [1666943275.315656][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943275.315658][12769:12769] CHIP:DMG: { - [1666943275.315660][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, - [1666943275.315662][12769:12769] CHIP:DMG: AttributePathIB = - [1666943275.315664][12769:12769] CHIP:DMG: { - [1666943275.315667][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943275.315669][12769:12769] CHIP:DMG: Cluster = 0x50, - [1666943275.315671][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666943275.315673][12769:12769] CHIP:DMG: ListIndex = Null, - [1666943275.315676][12769:12769] CHIP:DMG: } - [1666943275.315679][12769:12769] CHIP:DMG: - [1666943275.315681][12769:12769] CHIP:DMG: Data = 65529, - [1666943275.315683][12769:12769] CHIP:DMG: }, - [1666943275.315686][12769:12769] CHIP:DMG: - [1666943275.315688][12769:12769] CHIP:DMG: }, - [1666943275.315692][12769:12769] CHIP:DMG: - [1666943275.315694][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943275.315698][12769:12769] CHIP:DMG: { - [1666943275.315700][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943275.315703][12769:12769] CHIP:DMG: { - [1666943275.315705][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, - [1666943275.315707][12769:12769] CHIP:DMG: AttributePathIB = - [1666943275.315710][12769:12769] CHIP:DMG: { - [1666943275.315712][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943275.315714][12769:12769] CHIP:DMG: Cluster = 0x50, - [1666943275.315716][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666943275.315719][12769:12769] CHIP:DMG: ListIndex = Null, - [1666943275.315721][12769:12769] CHIP:DMG: } - [1666943275.315723][12769:12769] CHIP:DMG: - [1666943275.315726][12769:12769] CHIP:DMG: Data = 65531, - [1666943275.315728][12769:12769] CHIP:DMG: }, - [1666943275.315730][12769:12769] CHIP:DMG: - [1666943275.315732][12769:12769] CHIP:DMG: }, - [1666943275.315737][12769:12769] CHIP:DMG: - [1666943275.315738][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943275.315742][12769:12769] CHIP:DMG: { - [1666943275.315744][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943275.315746][12769:12769] CHIP:DMG: { - [1666943275.315748][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, - [1666943275.315750][12769:12769] CHIP:DMG: AttributePathIB = - [1666943275.315752][12769:12769] CHIP:DMG: { - [1666943275.315755][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943275.315757][12769:12769] CHIP:DMG: Cluster = 0x50, - [1666943275.315759][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666943275.315762][12769:12769] CHIP:DMG: ListIndex = Null, - [1666943275.315764][12769:12769] CHIP:DMG: } - [1666943275.315767][12769:12769] CHIP:DMG: - [1666943275.315769][12769:12769] CHIP:DMG: Data = 65532, - [1666943275.315771][12769:12769] CHIP:DMG: }, - [1666943275.315775][12769:12769] CHIP:DMG: - [1666943275.315777][12769:12769] CHIP:DMG: }, - [1666943275.315781][12769:12769] CHIP:DMG: - [1666943275.315783][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943275.315786][12769:12769] CHIP:DMG: { - [1666943275.315788][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943275.315792][12769:12769] CHIP:DMG: { - [1666943275.315794][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, - [1666943275.315796][12769:12769] CHIP:DMG: AttributePathIB = - [1666943275.315798][12769:12769] CHIP:DMG: { - [1666943275.315800][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943275.315802][12769:12769] CHIP:DMG: Cluster = 0x50, - [1666943275.315805][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666943275.315807][12769:12769] CHIP:DMG: ListIndex = Null, - [1666943275.315811][12769:12769] CHIP:DMG: } - [1666943275.315814][12769:12769] CHIP:DMG: - [1666943275.315817][12769:12769] CHIP:DMG: Data = 65533, - [1666943275.315819][12769:12769] CHIP:DMG: }, - [1666943275.315822][12769:12769] CHIP:DMG: - [1666943275.315824][12769:12769] CHIP:DMG: }, - [1666943275.315826][12769:12769] CHIP:DMG: - [1666943275.315828][12769:12769] CHIP:DMG: ], - [1666943275.315839][12769:12769] CHIP:DMG: - [1666943275.315841][12769:12769] CHIP:DMG: SuppressResponse = true, - [1666943275.315843][12769:12769] CHIP:DMG: InteractionModelRevision = 1 - [1666943275.315845][12769:12769] CHIP:DMG: } + Verify the "Attribute-list response" on the TH (all-cluster-minimal-app) log: + [1666943275.315331][12769:12769] CHIP:DMG: + [1666943275.315365][12769:12769] CHIP:DMG: ReportDataMessage = + [1666943275.315367][12769:12769] CHIP:DMG: { + [1666943275.315369][12769:12769] CHIP:DMG: AttributeReportIBs = + [1666943275.315372][12769:12769] CHIP:DMG: [ + [1666943275.315374][12769:12769] CHIP:DMG: AttributeReportIB = + [1666943275.315377][12769:12769] CHIP:DMG: { + [1666943275.315379][12769:12769] CHIP:DMG: AttributeDataIB = + [1666943275.315383][12769:12769] CHIP:DMG: { + [1666943275.315386][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, + [1666943275.315388][12769:12769] CHIP:DMG: AttributePathIB = + [1666943275.315390][12769:12769] CHIP:DMG: { + [1666943275.315394][12769:12769] CHIP:DMG: Endpoint = 0x1, + [1666943275.315397][12769:12769] CHIP:DMG: Cluster = 0x50, + [1666943275.315399][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, + [1666943275.315401][12769:12769] CHIP:DMG: } + [1666943275.315404][12769:12769] CHIP:DMG: + [1666943275.315406][12769:12769] CHIP:DMG: Data = [ + [1666943275.315409][12769:12769] CHIP:DMG: + [1666943275.315411][12769:12769] CHIP:DMG: ], + [1666943275.315413][12769:12769] CHIP:DMG: }, + [1666943275.315416][12769:12769] CHIP:DMG: + [1666943275.315418][12769:12769] CHIP:DMG: }, + [1666943275.315423][12769:12769] CHIP:DMG: + [1666943275.315424][12769:12769] CHIP:DMG: AttributeReportIB = + [1666943275.315429][12769:12769] CHIP:DMG: { + [1666943275.315431][12769:12769] CHIP:DMG: AttributeDataIB = + [1666943275.315434][12769:12769] CHIP:DMG: { + [1666943275.315436][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, + [1666943275.315438][12769:12769] CHIP:DMG: AttributePathIB = + [1666943275.315440][12769:12769] CHIP:DMG: { + [1666943275.315443][12769:12769] CHIP:DMG: Endpoint = 0x1, + [1666943275.315445][12769:12769] CHIP:DMG: Cluster = 0x50, + [1666943275.315448][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, + [1666943275.315450][12769:12769] CHIP:DMG: ListIndex = Null, + [1666943275.315452][12769:12769] CHIP:DMG: } + [1666943275.315455][12769:12769] CHIP:DMG: + [1666943275.315457][12769:12769] CHIP:DMG: Data = 0, + [1666943275.315459][12769:12769] CHIP:DMG: }, + [1666943275.315462][12769:12769] CHIP:DMG: + [1666943275.315464][12769:12769] CHIP:DMG: }, + [1666943275.315469][12769:12769] CHIP:DMG: + [1666943275.315470][12769:12769] CHIP:DMG: AttributeReportIB = + [1666943275.315474][12769:12769] CHIP:DMG: { + [1666943275.315476][12769:12769] CHIP:DMG: AttributeDataIB = + [1666943275.315478][12769:12769] CHIP:DMG: { + [1666943275.315481][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, + [1666943275.315483][12769:12769] CHIP:DMG: AttributePathIB = + [1666943275.315485][12769:12769] CHIP:DMG: { + [1666943275.315487][12769:12769] CHIP:DMG: Endpoint = 0x1, + [1666943275.315490][12769:12769] CHIP:DMG: Cluster = 0x50, + [1666943275.315492][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, + [1666943275.315494][12769:12769] CHIP:DMG: ListIndex = Null, + [1666943275.315497][12769:12769] CHIP:DMG: } + [1666943275.315499][12769:12769] CHIP:DMG: + [1666943275.315501][12769:12769] CHIP:DMG: Data = 1, + [1666943275.315504][12769:12769] CHIP:DMG: }, + [1666943275.315506][12769:12769] CHIP:DMG: + [1666943275.315508][12769:12769] CHIP:DMG: }, + [1666943275.315512][12769:12769] CHIP:DMG: + [1666943275.315514][12769:12769] CHIP:DMG: AttributeReportIB = + [1666943275.315518][12769:12769] CHIP:DMG: { + [1666943275.315519][12769:12769] CHIP:DMG: AttributeDataIB = + [1666943275.315522][12769:12769] CHIP:DMG: { + [1666943275.315524][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, + [1666943275.315526][12769:12769] CHIP:DMG: AttributePathIB = + [1666943275.315530][12769:12769] CHIP:DMG: { + [1666943275.315532][12769:12769] CHIP:DMG: Endpoint = 0x1, + [1666943275.315534][12769:12769] CHIP:DMG: Cluster = 0x50, + [1666943275.315537][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, + [1666943275.315539][12769:12769] CHIP:DMG: ListIndex = Null, + [1666943275.315541][12769:12769] CHIP:DMG: } + [1666943275.315543][12769:12769] CHIP:DMG: + [1666943275.315546][12769:12769] CHIP:DMG: Data = 2, + [1666943275.315548][12769:12769] CHIP:DMG: }, + [1666943275.315551][12769:12769] CHIP:DMG: + [1666943275.315553][12769:12769] CHIP:DMG: }, + [1666943275.315558][12769:12769] CHIP:DMG: + [1666943275.315560][12769:12769] CHIP:DMG: AttributeReportIB = + [1666943275.315564][12769:12769] CHIP:DMG: { + [1666943275.315566][12769:12769] CHIP:DMG: AttributeDataIB = + [1666943275.315568][12769:12769] CHIP:DMG: { + [1666943275.315571][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, + [1666943275.315573][12769:12769] CHIP:DMG: AttributePathIB = + [1666943275.315575][12769:12769] CHIP:DMG: { + [1666943275.315577][12769:12769] CHIP:DMG: Endpoint = 0x1, + [1666943275.315580][12769:12769] CHIP:DMG: Cluster = 0x50, + [1666943275.315582][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, + [1666943275.315585][12769:12769] CHIP:DMG: ListIndex = Null, + [1666943275.315587][12769:12769] CHIP:DMG: } + [1666943275.315590][12769:12769] CHIP:DMG: + [1666943275.315592][12769:12769] CHIP:DMG: Data = 3, + [1666943275.315594][12769:12769] CHIP:DMG: }, + [1666943275.315597][12769:12769] CHIP:DMG: + [1666943275.315599][12769:12769] CHIP:DMG: }, + [1666943275.315604][12769:12769] CHIP:DMG: + [1666943275.315605][12769:12769] CHIP:DMG: AttributeReportIB = + [1666943275.315609][12769:12769] CHIP:DMG: { + [1666943275.315611][12769:12769] CHIP:DMG: AttributeDataIB = + [1666943275.315613][12769:12769] CHIP:DMG: { + [1666943275.315616][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, + [1666943275.315617][12769:12769] CHIP:DMG: AttributePathIB = + [1666943275.315621][12769:12769] CHIP:DMG: { + [1666943275.315623][12769:12769] CHIP:DMG: Endpoint = 0x1, + [1666943275.315625][12769:12769] CHIP:DMG: Cluster = 0x50, + [1666943275.315628][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, + [1666943275.315630][12769:12769] CHIP:DMG: ListIndex = Null, + [1666943275.315632][12769:12769] CHIP:DMG: } + [1666943275.315635][12769:12769] CHIP:DMG: + [1666943275.315637][12769:12769] CHIP:DMG: Data = 65528, + [1666943275.315639][12769:12769] CHIP:DMG: }, + [1666943275.315642][12769:12769] CHIP:DMG: + [1666943275.315644][12769:12769] CHIP:DMG: }, + [1666943275.315648][12769:12769] CHIP:DMG: + [1666943275.315650][12769:12769] CHIP:DMG: AttributeReportIB = + [1666943275.315654][12769:12769] CHIP:DMG: { + [1666943275.315656][12769:12769] CHIP:DMG: AttributeDataIB = + [1666943275.315658][12769:12769] CHIP:DMG: { + [1666943275.315660][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, + [1666943275.315662][12769:12769] CHIP:DMG: AttributePathIB = + [1666943275.315664][12769:12769] CHIP:DMG: { + [1666943275.315667][12769:12769] CHIP:DMG: Endpoint = 0x1, + [1666943275.315669][12769:12769] CHIP:DMG: Cluster = 0x50, + [1666943275.315671][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, + [1666943275.315673][12769:12769] CHIP:DMG: ListIndex = Null, + [1666943275.315676][12769:12769] CHIP:DMG: } + [1666943275.315679][12769:12769] CHIP:DMG: + [1666943275.315681][12769:12769] CHIP:DMG: Data = 65529, + [1666943275.315683][12769:12769] CHIP:DMG: }, + [1666943275.315686][12769:12769] CHIP:DMG: + [1666943275.315688][12769:12769] CHIP:DMG: }, + [1666943275.315692][12769:12769] CHIP:DMG: + [1666943275.315694][12769:12769] CHIP:DMG: AttributeReportIB = + [1666943275.315698][12769:12769] CHIP:DMG: { + [1666943275.315700][12769:12769] CHIP:DMG: AttributeDataIB = + [1666943275.315703][12769:12769] CHIP:DMG: { + [1666943275.315705][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, + [1666943275.315707][12769:12769] CHIP:DMG: AttributePathIB = + [1666943275.315710][12769:12769] CHIP:DMG: { + [1666943275.315712][12769:12769] CHIP:DMG: Endpoint = 0x1, + [1666943275.315714][12769:12769] CHIP:DMG: Cluster = 0x50, + [1666943275.315716][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, + [1666943275.315719][12769:12769] CHIP:DMG: ListIndex = Null, + [1666943275.315721][12769:12769] CHIP:DMG: } + [1666943275.315723][12769:12769] CHIP:DMG: + [1666943275.315726][12769:12769] CHIP:DMG: Data = 65531, + [1666943275.315728][12769:12769] CHIP:DMG: }, + [1666943275.315730][12769:12769] CHIP:DMG: + [1666943275.315732][12769:12769] CHIP:DMG: }, + [1666943275.315737][12769:12769] CHIP:DMG: + [1666943275.315738][12769:12769] CHIP:DMG: AttributeReportIB = + [1666943275.315742][12769:12769] CHIP:DMG: { + [1666943275.315744][12769:12769] CHIP:DMG: AttributeDataIB = + [1666943275.315746][12769:12769] CHIP:DMG: { + [1666943275.315748][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, + [1666943275.315750][12769:12769] CHIP:DMG: AttributePathIB = + [1666943275.315752][12769:12769] CHIP:DMG: { + [1666943275.315755][12769:12769] CHIP:DMG: Endpoint = 0x1, + [1666943275.315757][12769:12769] CHIP:DMG: Cluster = 0x50, + [1666943275.315759][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, + [1666943275.315762][12769:12769] CHIP:DMG: ListIndex = Null, + [1666943275.315764][12769:12769] CHIP:DMG: } + [1666943275.315767][12769:12769] CHIP:DMG: + [1666943275.315769][12769:12769] CHIP:DMG: Data = 65532, + [1666943275.315771][12769:12769] CHIP:DMG: }, + [1666943275.315775][12769:12769] CHIP:DMG: + [1666943275.315777][12769:12769] CHIP:DMG: }, + [1666943275.315781][12769:12769] CHIP:DMG: + [1666943275.315783][12769:12769] CHIP:DMG: AttributeReportIB = + [1666943275.315786][12769:12769] CHIP:DMG: { + [1666943275.315788][12769:12769] CHIP:DMG: AttributeDataIB = + [1666943275.315792][12769:12769] CHIP:DMG: { + [1666943275.315794][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, + [1666943275.315796][12769:12769] CHIP:DMG: AttributePathIB = + [1666943275.315798][12769:12769] CHIP:DMG: { + [1666943275.315800][12769:12769] CHIP:DMG: Endpoint = 0x1, + [1666943275.315802][12769:12769] CHIP:DMG: Cluster = 0x50, + [1666943275.315805][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, + [1666943275.315807][12769:12769] CHIP:DMG: ListIndex = Null, + [1666943275.315811][12769:12769] CHIP:DMG: } + [1666943275.315814][12769:12769] CHIP:DMG: + [1666943275.315817][12769:12769] CHIP:DMG: Data = 65533, + [1666943275.315819][12769:12769] CHIP:DMG: }, + [1666943275.315822][12769:12769] CHIP:DMG: + [1666943275.315824][12769:12769] CHIP:DMG: }, + [1666943275.315826][12769:12769] CHIP:DMG: + [1666943275.315828][12769:12769] CHIP:DMG: ], + [1666943275.315839][12769:12769] CHIP:DMG: + [1666943275.315841][12769:12769] CHIP:DMG: SuppressResponse = true, + [1666943275.315843][12769:12769] CHIP:DMG: InteractionModelRevision = 1 + [1666943275.315845][12769:12769] CHIP:DMG: } + + ./chip-tool modeselect read feature-map 1 1 + + Verify the " Feature-map " on the TH (all-cluster-minimal-app) log: + [1666943338.908026][12769:12769] CHIP:DMG: ReportDataMessage = + [1666943338.908028][12769:12769] CHIP:DMG: { + [1666943338.908031][12769:12769] CHIP:DMG: AttributeReportIBs = + [1666943338.908035][12769:12769] CHIP:DMG: [ + [1666943338.908038][12769:12769] CHIP:DMG: AttributeReportIB = + [1666943338.908042][12769:12769] CHIP:DMG: { + [1666943338.908045][12769:12769] CHIP:DMG: AttributeDataIB = + [1666943338.908048][12769:12769] CHIP:DMG: { + [1666943338.908051][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, + [1666943338.908054][12769:12769] CHIP:DMG: AttributePathIB = + [1666943338.908057][12769:12769] CHIP:DMG: { + [1666943338.908060][12769:12769] CHIP:DMG: Endpoint = 0x1, + [1666943338.908064][12769:12769] CHIP:DMG: Cluster = 0x50, + [1666943338.908067][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFC, + [1666943338.908070][12769:12769] CHIP:DMG: } + [1666943338.908074][12769:12769] CHIP:DMG: + [1666943338.908077][12769:12769] CHIP:DMG: Data = 0, + [1666943338.908080][12769:12769] CHIP:DMG: }, + [1666943338.908084][12769:12769] CHIP:DMG: + [1666943338.908086][12769:12769] CHIP:DMG: }, + [1666943338.908090][12769:12769] CHIP:DMG: + [1666943338.908092][12769:12769] CHIP:DMG: ], + [1666943338.908096][12769:12769] CHIP:DMG: + [1666943338.908099][12769:12769] CHIP:DMG: SuppressResponse = true, + [1666943338.908102][12769:12769] CHIP:DMG: InteractionModelRevision = 1 + [1666943338.908104][12769:12769] CHIP:DMG: } - ./chip-tool modeselect read current-mode 1 1 + ./chip-tool modeselect read supported-modes 1 1 - verify the "current-modes response" on the TH (all-cluster-minimal-app) log: - 1666943427.104790][12769:12769] CHIP:DMG: ReportDataMessage = - [1666943427.104798][12769:12769] CHIP:DMG: { - [1666943427.104804][12769:12769] CHIP:DMG: AttributeReportIBs = - [1666943427.104814][12769:12769] CHIP:DMG: [ - [1666943427.104820][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943427.104838][12769:12769] CHIP:DMG: { - [1666943427.104846][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943427.104858][12769:12769] CHIP:DMG: { - [1666943427.104869][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, - [1666943427.104880][12769:12769] CHIP:DMG: AttributePathIB = - [1666943427.104891][12769:12769] CHIP:DMG: { - [1666943427.104904][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943427.104916][12769:12769] CHIP:DMG: Cluster = 0x50, - [1666943427.104931][12769:12769] CHIP:DMG: Attribute = 0x0000_0003, - [1666943427.104939][12769:12769] CHIP:DMG: } - [1666943427.104948][12769:12769] CHIP:DMG: - [1666943427.104956][12769:12769] CHIP:DMG: Data = 0, - [1666943427.104963][12769:12769] CHIP:DMG: }, - [1666943427.104974][12769:12769] CHIP:DMG: - [1666943427.104981][12769:12769] CHIP:DMG: }, - [1666943427.104991][12769:12769] CHIP:DMG: - [1666943427.105001][12769:12769] CHIP:DMG: ], - [1666943427.105017][12769:12769] CHIP:DMG: - [1666943427.105027][12769:12769] CHIP:DMG: SuppressResponse = true, - [1666943427.105037][12769:12769] CHIP:DMG: InteractionModelRevision = 1 - [1666943427.105045][12769:12769] CHIP:DMG: } + Verify the "Supported-modes response" on the TH (all-cluster-minimal-app) log: + 1666943362.813636][12769:12769] CHIP:DMG: ReportDataMessage = + [1666943362.813638][12769:12769] CHIP:DMG: { + [1666943362.813640][12769:12769] CHIP:DMG: AttributeReportIBs = + [1666943362.813643][12769:12769] CHIP:DMG: [ + [1666943362.813645][12769:12769] CHIP:DMG: AttributeReportIB = + [1666943362.813650][12769:12769] CHIP:DMG: { + [1666943362.813652][12769:12769] CHIP:DMG: AttributeDataIB = + [1666943362.813655][12769:12769] CHIP:DMG: { + [1666943362.813657][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, + [1666943362.813659][12769:12769] CHIP:DMG: AttributePathIB = + [1666943362.813662][12769:12769] CHIP:DMG: { + [1666943362.813664][12769:12769] CHIP:DMG: Endpoint = 0x1, + [1666943362.813666][12769:12769] CHIP:DMG: Cluster = 0x50, + [1666943362.813669][12769:12769] CHIP:DMG: Attribute = 0x0000_0002, + [1666943362.813671][12769:12769] CHIP:DMG: } + [1666943362.813674][12769:12769] CHIP:DMG: + [1666943362.813676][12769:12769] CHIP:DMG: Data = [ + [1666943362.813679][12769:12769] CHIP:DMG: + [1666943362.813681][12769:12769] CHIP:DMG: ], + [1666943362.813683][12769:12769] CHIP:DMG: }, + [1666943362.813686][12769:12769] CHIP:DMG: + [1666943362.813688][12769:12769] CHIP:DMG: }, + [1666943362.813692][12769:12769] CHIP:DMG: + [1666943362.813694][12769:12769] CHIP:DMG: AttributeReportIB = + [1666943362.813699][12769:12769] CHIP:DMG: { + [1666943362.813701][12769:12769] CHIP:DMG: AttributeDataIB = + [1666943362.813703][12769:12769] CHIP:DMG: { + [1666943362.813705][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, + [1666943362.813707][12769:12769] CHIP:DMG: AttributePathIB = + [1666943362.813709][12769:12769] CHIP:DMG: { + [1666943362.813711][12769:12769] CHIP:DMG: Endpoint = 0x1, + [1666943362.813714][12769:12769] CHIP:DMG: Cluster = 0x50, + [1666943362.813716][12769:12769] CHIP:DMG: Attribute = 0x0000_0002, + [1666943362.813719][12769:12769] CHIP:DMG: ListIndex = Null, + [1666943362.813721][12769:12769] CHIP:DMG: } + [1666943362.813725][12769:12769] CHIP:DMG: + [1666943362.813727][12769:12769] CHIP:DMG: Data = + [1666943362.813729][12769:12769] CHIP:DMG: { + [1666943362.813732][12769:12769] CHIP:DMG: 0x0 = "Black" (5 chars), + [1666943362.813735][12769:12769] CHIP:DMG: 0x1 = 0, + [1666943362.813737][12769:12769] CHIP:DMG: 0x2 = [ + [1666943362.813740][12769:12769] CHIP:DMG: + [1666943362.813742][12769:12769] CHIP:DMG: { + [1666943362.813745][12769:12769] CHIP:DMG: 0x0 = 0, + [1666943362.813748][12769:12769] CHIP:DMG: 0x1 = 0, + [1666943362.813750][12769:12769] CHIP:DMG: }, + [1666943362.813752][12769:12769] CHIP:DMG: ], + [1666943362.813755][12769:12769] CHIP:DMG: }, + [1666943362.813756][12769:12769] CHIP:DMG: }, + [1666943362.813760][12769:12769] CHIP:DMG: + [1666943362.813762][12769:12769] CHIP:DMG: }, + [1666943362.813768][12769:12769] CHIP:DMG: + [1666943362.813770][12769:12769] CHIP:DMG: AttributeReportIB = + [1666943362.813775][12769:12769] CHIP:DMG: { + [1666943362.813776][12769:12769] CHIP:DMG: AttributeDataIB = + [1666943362.813779][12769:12769] CHIP:DMG: { + [1666943362.813781][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, + [1666943362.813783][12769:12769] CHIP:DMG: AttributePathIB = + [1666943362.813786][12769:12769] CHIP:DMG: { + [1666943362.813788][12769:12769] CHIP:DMG: Endpoint = 0x1, + [1666943362.813790][12769:12769] CHIP:DMG: Cluster = 0x50, + [1666943362.813793][12769:12769] CHIP:DMG: Attribute = 0x0000_0002, + [1666943362.813795][12769:12769] CHIP:DMG: ListIndex = Null, + [1666943362.813797][12769:12769] CHIP:DMG: } + [1666943362.813801][12769:12769] CHIP:DMG: + [1666943362.813803][12769:12769] CHIP:DMG: Data = + [1666943362.813805][12769:12769] CHIP:DMG: { + [1666943362.813807][12769:12769] CHIP:DMG: 0x0 = "Cappuccino" (10 chars), + [1666943362.813810][12769:12769] CHIP:DMG: 0x1 = 4, + [1666943362.813812][12769:12769] CHIP:DMG: 0x2 = [ + [1666943362.813814][12769:12769] CHIP:DMG: + [1666943362.813817][12769:12769] CHIP:DMG: { + [1666943362.813820][12769:12769] CHIP:DMG: 0x0 = 0, + [1666943362.813823][12769:12769] CHIP:DMG: 0x1 = 0, + [1666943362.813826][12769:12769] CHIP:DMG: }, + [1666943362.813828][12769:12769] CHIP:DMG: ], + [1666943362.813830][12769:12769] CHIP:DMG: }, + [1666943362.813832][12769:12769] CHIP:DMG: }, + [1666943362.813836][12769:12769] CHIP:DMG: + [1666943362.813838][12769:12769] CHIP:DMG: }, + [1666943362.813844][12769:12769] CHIP:DMG: + [1666943362.813846][12769:12769] CHIP:DMG: AttributeReportIB = + [1666943362.813850][12769:12769] CHIP:DMG: { + [1666943362.813852][12769:12769] CHIP:DMG: AttributeDataIB = + [1666943362.813855][12769:12769] CHIP:DMG: { + [1666943362.813857][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, + [1666943362.813860][12769:12769] CHIP:DMG: AttributePathIB = + [1666943362.813862][12769:12769] CHIP:DMG: { + [1666943362.813864][12769:12769] CHIP:DMG: Endpoint = 0x1, + [1666943362.813866][12769:12769] CHIP:DMG: Cluster = 0x50, + [1666943362.813869][12769:12769] CHIP:DMG: Attribute = 0x0000_0002, + [1666943362.813871][12769:12769] CHIP:DMG: ListIndex = Null, + [1666943362.813873][12769:12769] CHIP:DMG: } + [1666943362.813876][12769:12769] CHIP:DMG: + [1666943362.813878][12769:12769] CHIP:DMG: Data = + [1666943362.813881][12769:12769] CHIP:DMG: { + [1666943362.813883][12769:12769] CHIP:DMG: 0x0 = "Espresso" (8 chars), + [1666943362.813886][12769:12769] CHIP:DMG: 0x1 = 7, + [1666943362.813888][12769:12769] CHIP:DMG: 0x2 = [ + [1666943362.813890][12769:12769] CHIP:DMG: + [1666943362.813893][12769:12769] CHIP:DMG: { + [1666943362.813895][12769:12769] CHIP:DMG: 0x0 = 0, + [1666943362.813898][12769:12769] CHIP:DMG: 0x1 = 0, + [1666943362.813900][12769:12769] CHIP:DMG: }, + [1666943362.813903][12769:12769] CHIP:DMG: ], + [1666943362.813905][12769:12769] CHIP:DMG: }, + [1666943362.813907][12769:12769] CHIP:DMG: }, + [1666943362.813911][12769:12769] CHIP:DMG: + [1666943362.813913][12769:12769] CHIP:DMG: }, + [1666943362.813917][12769:12769] CHIP:DMG: + [1666943362.813918][12769:12769] CHIP:DMG: ], + [1666943362.813926][12769:12769] CHIP:DMG: + [1666943362.813928][12769:12769] CHIP:DMG: SuppressResponse = true, + [1666943362.813931][12769:12769] CHIP:DMG: InteractionModelRevision = 1 + [1666943362.813934][12769:12769] CHIP:DMG: } + [1666943362.813936][12769:12769] CHIP:DMG: - ./chip-tool modeselect read standard-namespace 1 1 - - verify the "standard-namespace response" on the TH (all-cluster-minimal-app) log: - - [1666943453.966995][12769:12769] CHIP:DMG: ReportDataMessage = - [1666943453.966997][12769:12769] CHIP:DMG: { - [1666943453.966999][12769:12769] CHIP:DMG: AttributeReportIBs = - [1666943453.967003][12769:12769] CHIP:DMG: [ - [1666943453.967005][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943453.967008][12769:12769] CHIP:DMG: { - [1666943453.967010][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943453.967014][12769:12769] CHIP:DMG: { - [1666943453.967017][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, - [1666943453.967019][12769:12769] CHIP:DMG: AttributePathIB = - [1666943453.967021][12769:12769] CHIP:DMG: { - [1666943453.967025][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943453.967027][12769:12769] CHIP:DMG: Cluster = 0x50, - [1666943453.967029][12769:12769] CHIP:DMG: Attribute = 0x0000_0001, - [1666943453.967033][12769:12769] CHIP:DMG: } - [1666943453.967035][12769:12769] CHIP:DMG: - [1666943453.967038][12769:12769] CHIP:DMG: Data = 0, - [1666943453.967040][12769:12769] CHIP:DMG: }, - [1666943453.967043][12769:12769] CHIP:DMG: - [1666943453.967045][12769:12769] CHIP:DMG: }, - [1666943453.967047][12769:12769] CHIP:DMG: - [1666943453.967050][12769:12769] CHIP:DMG: ], - [1666943453.967053][12769:12769] CHIP:DMG: - [1666943453.967055][12769:12769] CHIP:DMG: SuppressResponse = true, - [1666943453.967057][12769:12769] CHIP:DMG: InteractionModelRevision = 1 + ./chip-tool modeselect read current-mode 1 1 + Verify the "Current-modes response" on the TH (all-cluster-minimal-app) log: + 1666943427.104790][12769:12769] CHIP:DMG: ReportDataMessage = + [1666943427.104798][12769:12769] CHIP:DMG: { + [1666943427.104804][12769:12769] CHIP:DMG: AttributeReportIBs = + [1666943427.104814][12769:12769] CHIP:DMG: [ + [1666943427.104820][12769:12769] CHIP:DMG: AttributeReportIB = + [1666943427.104838][12769:12769] CHIP:DMG: { + [1666943427.104846][12769:12769] CHIP:DMG: AttributeDataIB = + [1666943427.104858][12769:12769] CHIP:DMG: { + [1666943427.104869][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, + [1666943427.104880][12769:12769] CHIP:DMG: AttributePathIB = + [1666943427.104891][12769:12769] CHIP:DMG: { + [1666943427.104904][12769:12769] CHIP:DMG: Endpoint = 0x1, + [1666943427.104916][12769:12769] CHIP:DMG: Cluster = 0x50, + [1666943427.104931][12769:12769] CHIP:DMG: Attribute = 0x0000_0003, + [1666943427.104939][12769:12769] CHIP:DMG: } + [1666943427.104948][12769:12769] CHIP:DMG: + [1666943427.104956][12769:12769] CHIP:DMG: Data = 0, + [1666943427.104963][12769:12769] CHIP:DMG: }, + [1666943427.104974][12769:12769] CHIP:DMG: + [1666943427.104981][12769:12769] CHIP:DMG: }, + [1666943427.104991][12769:12769] CHIP:DMG: + [1666943427.105001][12769:12769] CHIP:DMG: ], + [1666943427.105017][12769:12769] CHIP:DMG: + [1666943427.105027][12769:12769] CHIP:DMG: SuppressResponse = true, + [1666943427.105037][12769:12769] CHIP:DMG: InteractionModelRevision = 1 + [1666943427.105045][12769:12769] CHIP:DMG: } + + ./chip-tool modeselect read standard-namespace 1 1 + + Verify the "Standard-namespace response" on the TH (all-cluster-minimal-app) log: + + [1666943453.966995][12769:12769] CHIP:DMG: ReportDataMessage = + [1666943453.966997][12769:12769] CHIP:DMG: { + [1666943453.966999][12769:12769] CHIP:DMG: AttributeReportIBs = + [1666943453.967003][12769:12769] CHIP:DMG: [ + [1666943453.967005][12769:12769] CHIP:DMG: AttributeReportIB = + [1666943453.967008][12769:12769] CHIP:DMG: { + [1666943453.967010][12769:12769] CHIP:DMG: AttributeDataIB = + [1666943453.967014][12769:12769] CHIP:DMG: { + [1666943453.967017][12769:12769] CHIP:DMG: DataVersion = 0x5fb921d0, + [1666943453.967019][12769:12769] CHIP:DMG: AttributePathIB = + [1666943453.967021][12769:12769] CHIP:DMG: { + [1666943453.967025][12769:12769] CHIP:DMG: Endpoint = 0x1, + [1666943453.967027][12769:12769] CHIP:DMG: Cluster = 0x50, + [1666943453.967029][12769:12769] CHIP:DMG: Attribute = 0x0000_0001, + [1666943453.967033][12769:12769] CHIP:DMG: } + [1666943453.967035][12769:12769] CHIP:DMG: + [1666943453.967038][12769:12769] CHIP:DMG: Data = 0, + [1666943453.967040][12769:12769] CHIP:DMG: }, + [1666943453.967043][12769:12769] CHIP:DMG: + [1666943453.967045][12769:12769] CHIP:DMG: }, + [1666943453.967047][12769:12769] CHIP:DMG: + [1666943453.967050][12769:12769] CHIP:DMG: ], + [1666943453.967053][12769:12769] CHIP:DMG: + [1666943453.967055][12769:12769] CHIP:DMG: SuppressResponse = true, + [1666943453.967057][12769:12769] CHIP:DMG: InteractionModelRevision = 1 ./chip-tool modeselect read description 1 1 - verify the "description response" on the TH (all-cluster-minimal-app) log: - - [1666941093.845092][9718:9718] CHIP:DMG: ReportDataMessage = - [1666941093.845094][9718:9718] CHIP:DMG: { - [1666941093.845096][9718:9718] CHIP:DMG: AttributeReportIBs = - [1666941093.845099][9718:9718] CHIP:DMG: [ - [1666941093.845101][9718:9718] CHIP:DMG: AttributeReportIB = - [1666941093.845105][9718:9718] CHIP:DMG: { - [1666941093.845107][9718:9718] CHIP:DMG: AttributeDataIB = - [1666941093.845110][9718:9718] CHIP:DMG: { - [1666941093.845112][9718:9718] CHIP:DMG: DataVersion = 0xb4a9126f, - [1666941093.845115][9718:9718] CHIP:DMG: AttributePathIB = - [1666941093.845117][9718:9718] CHIP:DMG: { - [1666941093.845119][9718:9718] CHIP:DMG: Endpoint = 0x1, - [1666941093.845122][9718:9718] CHIP:DMG: Cluster = 0x50, - [1666941093.845124][9718:9718] CHIP:DMG: Attribute = 0x0000_0000, - [1666941093.845126][9718:9718] CHIP:DMG: } - [1666941093.845129][9718:9718] CHIP:DMG: - [1666941093.845132][9718:9718] CHIP:DMG: Data = "Coffee" (6 chars), - [1666941093.845134][9718:9718] CHIP:DMG: }, - [1666941093.845137][9718:9718] CHIP:DMG: - [1666941093.845139][9718:9718] CHIP:DMG: }, - [1666941093.845142][9718:9718] CHIP:DMG: - [1666941093.845144][9718:9718] CHIP:DMG: ], - [1666941093.845147][9718:9718] CHIP:DMG: - [1666941093.845149][9718:9718] CHIP:DMG: SuppressResponse = true, - [1666941093.845152][9718:9718] CHIP:DMG: InteractionModelRevision = 1 + Verify the "Description response" on the TH (all-cluster-minimal-app) log: + [1666941093.845092][9718:9718] CHIP:DMG: ReportDataMessage = + [1666941093.845094][9718:9718] CHIP:DMG: { + [1666941093.845096][9718:9718] CHIP:DMG: AttributeReportIBs = + [1666941093.845099][9718:9718] CHIP:DMG: [ + [1666941093.845101][9718:9718] CHIP:DMG: AttributeReportIB = + [1666941093.845105][9718:9718] CHIP:DMG: { + [1666941093.845107][9718:9718] CHIP:DMG: AttributeDataIB = + [1666941093.845110][9718:9718] CHIP:DMG: { + [1666941093.845112][9718:9718] CHIP:DMG: DataVersion = 0xb4a9126f, + [1666941093.845115][9718:9718] CHIP:DMG: AttributePathIB = + [1666941093.845117][9718:9718] CHIP:DMG: { + [1666941093.845119][9718:9718] CHIP:DMG: Endpoint = 0x1, + [1666941093.845122][9718:9718] CHIP:DMG: Cluster = 0x50, + [1666941093.845124][9718:9718] CHIP:DMG: Attribute = 0x0000_0000, + [1666941093.845126][9718:9718] CHIP:DMG: } + [1666941093.845129][9718:9718] CHIP:DMG: + [1666941093.845132][9718:9718] CHIP:DMG: Data = "Coffee" (6 chars), + [1666941093.845134][9718:9718] CHIP:DMG: }, + [1666941093.845137][9718:9718] CHIP:DMG: + [1666941093.845139][9718:9718] CHIP:DMG: }, + [1666941093.845142][9718:9718] CHIP:DMG: + [1666941093.845144][9718:9718] CHIP:DMG: ], + [1666941093.845147][9718:9718] CHIP:DMG: + [1666941093.845149][9718:9718] CHIP:DMG: SuppressResponse = true, + [1666941093.845152][9718:9718] CHIP:DMG: InteractionModelRevision = 1 disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_MOD_2_1.yaml b/src/app/tests/suites/certification/Test_TC_MOD_2_1.yaml index f59a6520d00d09..34636d41d62773 100644 --- a/src/app/tests/suites/certification/Test_TC_MOD_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_MOD_2_1.yaml @@ -34,7 +34,7 @@ tests: verification: | ./chip-tool modeselect read supported-modes 1 1 - Verify on TH(chip-tool) logs supported modes provides a list of mode, each mode should be a struct containing a label and All of these values should be no larger than 16 bits and below is the sample log provided for the raspi platform: + Verify on TH(chip-tool) log SupportedModes provides a list of modes and each mode should be a struct containing a Label , Mode Number and SemanticTags. Also each entry in the semantics tag list, are structs containing a value field and manufacturer code. All of these values should be no larger than 16 bits and below is the sample log provided for the raspi platform: [1654595268.854568][14400:14405] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0002 DataVersion: 366231602 @@ -75,7 +75,7 @@ tests: verification: | ./chip-tool modeselect read current-mode 1 1 - Verify on TH(chip-tool), current modes provides a mode Record for usage in steps 3 and below is the sample log provided for the raspi platform: + Verify on TH(chip-tool), Current modes provides mode number for usage in steps 3 and below is the sample log provided for the raspi platform: [1649678800.298128][10854:10861] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 4277065073 @@ -103,7 +103,7 @@ tests: verification: | ./chip-tool modeselect read current-mode 1 1 - Verify on TH(chip-tool), current modes provides integer provided in step 3a, not the integer from step 2 and below is the sample log provided for the raspi platform: + Verify on TH(chip-tool), Current modes attribute value is same as value provided in step 3a, not the integer from step 2 and below is the sample log provided for the raspi platform: [1649678800.298128][10854:10861] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 4277065073 @@ -117,7 +117,7 @@ tests: verification: | ./chip-tool modeselect change-to-mode 2 1 1 - Verify on TH(chip-tool)logs , with a INVALID_COMMAND (hex value 0x85/decimal 133) and below is the sample log provided for the raspi platform: + Verify on TH(chip-tool)logs, Change to Mode Command responds with a INVALID_COMMAND (hex value 0x85/decimal 133) and below is the sample log provided for the raspi platform: CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0050 Command=0x0000_0000 Status=0x85 CHIP:TOO: Error: IM Error 0x00000585: General error: 0x85 (INVALID_COMMAND) diff --git a/src/app/tests/suites/certification/Test_TC_MOD_3_1.yaml b/src/app/tests/suites/certification/Test_TC_MOD_3_1.yaml index e73b7f769a4fb9..4c84f00bfdd19d 100644 --- a/src/app/tests/suites/certification/Test_TC_MOD_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_MOD_3_1.yaml @@ -27,6 +27,8 @@ tests: - label: "Note" verification: | To execute this test case set onmode to any integer value because as default it value has null. + + ./chip-tool modeselect write on-mode 0 1 1 disabled: true - label: "Precondition" @@ -39,7 +41,7 @@ tests: verification: | ./chip-tool modeselect read on-mode 1 1 - on TH(chip-tool),Verify that the DUT response is an integer. Record this value for usage in steps 2b and below is the sample log provided for the raspi platform: + On TH(chip-tool),Verify that the DUT response is an integer. Record this value for usage in steps 2b and below is the sample log provided for the raspi platform: [1649678983.679893][10871:10876] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0005 DataVersion: 4277065073 [1649678983.680002][10871:10876] CHIP:TOO: OnMode: 0 @@ -50,7 +52,7 @@ tests: verification: | ./chip-tool modeselect read current-mode 1 1 - on TH(chip-tool),Verify that the DUT response is an integer. Record this value for usage in steps 2b and below is the sample log provided for the raspi platform: + On TH(chip-tool),Verify that the DUT response is an integer. Record this value for usage in steps 2b and below is the sample log provided for the raspi platform: [1649679034.895848][10879:10884] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 4277065073 [1649679034.895972][10879:10884] CHIP:TOO: CurrentMode: 0 @@ -70,7 +72,7 @@ tests: verification: | ./chip-tool modeselect read supported-modes 1 1 - Verify on TH(chip-tool) logs supported modes provides a list of mode, each mode should be a struct containing a label and all of these values should be no larger than 16 bits for usage in step 2d and below is the sample log provided for the raspi platform: + Verify on TH(chip-tool) logs Supported modes provides a list of mode, each mode should be a struct containing a label and all of these values should be no larger than 16 bits for usage in step 2d and below is the sample log provided for the raspi platform: [1654595268.854568][14400:14405] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0002 DataVersion: 366231602 [1654595268.854678][14400:14405] CHIP:TOO: SupportedModes: 3 entries @@ -113,7 +115,7 @@ tests: verification: | ./chip-tool modeselect change-to-mode 7 1 1 - on TH(chip-tool) log verify that status has a value 0x00 (success) and below is the sample log provided for the raspi platform: + On TH(chip-tool) log verify that status has a value 0x00 (success) and below is the sample log provided for the raspi platform: [1645777419.711572][4798:4803] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0050 Command=0x0000_0000 Status=0x0 disabled: true @@ -124,7 +126,7 @@ tests: ./chip-tool onoff off 1 1 - on TH(chip-tool) log verify that status has a value 0x00 (success) and below is the sample log provided for the raspi platform: + On TH(chip-tool) log verify that status has a value 0x00 (success) and below is the sample log provided for the raspi platform: [1649679101.658594][10886:10891] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0006 Command=0x0000_0000 Status=0x0 disabled: true @@ -133,7 +135,7 @@ tests: verification: | ./chip-tool onoff on 1 1 - on TH(chip-tool) log verify that status has a value 0x00 (success) and below is the sample log provided for the raspi platform: + On TH(chip-tool) log verify that status has a value 0x00 (success) and below is the sample log provided for the raspi platform: [1649679156.146015][10893:10898] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0006 Command=0x0000_0001 Status=0x0 disabled: true @@ -143,7 +145,7 @@ tests: verification: | ./chip-tool modeselect read current-mode 1 1 - on TH(chip-tool),verify that CurrentMode has the same value recorded in step 1 and below is the sample log provided for the raspi platform: + On TH(chip-tool),verify that CurrentMode has the same value recorded in step 1 and below is the sample log provided for the raspi platform: [1649679202.069163][10899:10904] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0050 Attribute 0x0000_0003 DataVersion: 4277065073 [1649679202.069278][10899:10904] CHIP:TOO: CurrentMode: 0 diff --git a/src/app/tests/suites/certification/Test_TC_OCC_2_2_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_OCC_2_2_Simulated.yaml index b376651adffaf4..92d62439f7e8f0 100644 --- a/src/app/tests/suites/certification/Test_TC_OCC_2_2_Simulated.yaml +++ b/src/app/tests/suites/certification/Test_TC_OCC_2_2_Simulated.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 30.2.1. [TC-OCC-2.2] Attributes with server as DUT +name: 28.2.2. [TC-OCC-2.2] Attributes with client as DUT PICS: - OCC.C diff --git a/src/app/tests/suites/certification/Test_TC_OCC_2_4_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_OCC_2_4_Simulated.yaml index 8db97983edd9fc..3417f29ea9fe32 100644 --- a/src/app/tests/suites/certification/Test_TC_OCC_2_4_Simulated.yaml +++ b/src/app/tests/suites/certification/Test_TC_OCC_2_4_Simulated.yaml @@ -12,7 +12,9 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 30.2.1. [TC-OCC-2.4] Attributes with server as DUT +name: + 28.3.2. [TC-OCC-2.4] OccupancySensorTypeBitmap and OccupancySensorType + interdependency with client as DUT PICS: - OCC.C @@ -28,11 +30,11 @@ tests: # command: "WaitForCommissioning" - label: "TH reads OccupancySensorType attribute from DUT" - PICS: OCC.S.A0001 + PICS: OCC.C.A0001 wait: "readAttribute" attribute: "OccupancySensorType" - label: "TH reads OccupancySensorTypeBitmap attribute from DUT" - PICS: OCC.S.A0002 + PICS: OCC.C.A0002 wait: "readAttribute" attribute: "OccupancySensorTypeBitmap" diff --git a/src/app/tests/suites/certification/Test_TC_OPCREDS_3_6.yaml b/src/app/tests/suites/certification/Test_TC_OPCREDS_3_6.yaml index adf38bba64d025..5e9e7ddb3a206f 100644 --- a/src/app/tests/suites/certification/Test_TC_OPCREDS_3_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_OPCREDS_3_6.yaml @@ -91,9 +91,26 @@ tests: - label: "DUT shouldnt be discoverable via both commissionable and operational advertisements" + PICS: " !MCORE.DD.EXTENDED_DISCOVERY " verification: | Verify DUT is not discoverable over DNS-SD in both TCP and UDP avahi-browse -rt _matter._tcp avahi-browse -rt _matter._udp disabled: true + + - label: + "DUT should be discoverable via commissionable service advertisements + but shall not be in the commissioning mode" + PICS: MCORE.DD.EXTENDED_DISCOVERY + verification: | + Verify that the DUT is discoverable over DNS-SD with service type _matterc._udp with no subtype _CM and text key for CM with value 0 + + avahi-browse -rt _matterc._udp + + br-aa67f1f8401d IPv4 DC126952E0AC4BD5 _matterc._udp local + hostname = [E45F012EED550000.local] + address = [172.18.0.1] + port = [5540] + txt = [""PI="" ""PH=33"" ""CM=0"" ""D=3840"" ""T=1"" ""DN=Test Bulb"" ""DT=257"" ""VP=65521+32769""] + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_PCC_2_2.yaml b/src/app/tests/suites/certification/Test_TC_PCC_2_2.yaml index 0d02638d029fe6..310268782fdca7 100644 --- a/src/app/tests/suites/certification/Test_TC_PCC_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_PCC_2_2.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 15.2.2. [TC-PCC-2.2] Primary functionality with server as DUT +name: 16.2.2. [TC-PCC-2.2] Operation Mode with Server as DUT PICS: - PCC.S diff --git a/src/app/tests/suites/certification/Test_TC_PCC_2_3.yaml b/src/app/tests/suites/certification/Test_TC_PCC_2_3.yaml index 1e90d6ce70a037..ae1a7c819b399f 100644 --- a/src/app/tests/suites/certification/Test_TC_PCC_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_PCC_2_3.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 15.2.3. [TC-PCC-2.3] Primary functionality with server as DUT +name: 16.2.3. [TC-PCC-2.3] Control Mode with Server as DUT PICS: - PCC.S diff --git a/src/app/tests/suites/certification/Test_TC_PCC_2_4.yaml b/src/app/tests/suites/certification/Test_TC_PCC_2_4.yaml index 091f62eb8af885..601f084846112f 100644 --- a/src/app/tests/suites/certification/Test_TC_PCC_2_4.yaml +++ b/src/app/tests/suites/certification/Test_TC_PCC_2_4.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 15.2.4. [TC-PCC-2.4] Primary functionality with server as DUT +name: 16.2.4. [TC-PCC-2.4] Life Time Counters with Server as DUT PICS: - PCC.S diff --git a/src/app/tests/suites/certification/Test_TC_PRS_3_1.yaml b/src/app/tests/suites/certification/Test_TC_PRS_3_1.yaml new file mode 100644 index 00000000000000..a44028465a834e --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_PRS_3_1.yaml @@ -0,0 +1,312 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default + +name: 34.3.1. [TC-PRS-3.1] Attributes with client as DUT + +PICS: + - PRS.C + - PRS.C.AM-READ + - PRS.C.AO-READ + - PRS.C.AM-WRITE + - PRS.C.AO-WRITE + +config: + nodeId: 0x12344321 + cluster: "Basic Information" + endpoint: 0 + +tests: + - label: "Note" + verification: | + For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. + disabled: true + + - label: + "DUT reads all supported mandatory attributes from TH one at a time in + a manufacturer specific order." + PICS: PRS.C.AM-READ + verification: | + Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) + + + ./chip-tool pressuremeasurement read measured-value 1 1 + + verify the " measured-value response" on the TH (all-cluster-app) log: + + [1653992317.047323][2347:2347] CHIP:IM: Received Read request + [1653992317.047382][2347:2347] CHIP:DMG: ReadRequestMessage = + [1653992317.047457][2347:2347] CHIP:DMG: { + [1653992317.047480][2347:2347] CHIP:DMG: AttributePathIBs = + [1653992317.047507][2347:2347] CHIP:DMG: [ + [1653992317.047531][2347:2347] CHIP:DMG: AttributePathIB = + [1653992317.047563][2347:2347] CHIP:DMG: { + [1653992317.047592][2347:2347] CHIP:DMG: Endpoint = 0x1, + [1653992317.047657][2347:2347] CHIP:DMG: Cluster = 0x403, + [1653992317.047695][2347:2347] CHIP:DMG: Attribute = 0x0000_0000, + [1653992317.047725][2347:2347] CHIP:DMG: } + [1653992317.047774][2347:2347] CHIP:DMG: + [1653992317.047803][2347:2347] CHIP:DMG: ], + [1653992317.047831][2347:2347] CHIP:DMG: + [1653992317.047859][2347:2347] CHIP:DMG: isFabricFiltered = true, + [1653992317.047884][2347:2347] CHIP:DMG: InteractionModelRevision = 1 + [1653992317.047908][2347:2347] CHIP:DMG: }, + [1653992317.047995][2347:2347] CHIP:DMG: IM RH moving to [GeneratingReports] + + ./chip-tool pressuremeasurement read min-measured-value 1 1 + + verify the " min-measured-value response" on the TH (all-cluster-app) log: + + [1653992385.759474][2347:2347] CHIP:IM: Received Read request + [1653992385.759533][2347:2347] CHIP:DMG: ReadRequestMessage = + [1653992385.759561][2347:2347] CHIP:DMG: { + [1653992385.759584][2347:2347] CHIP:DMG: AttributePathIBs = + [1653992385.759618][2347:2347] CHIP:DMG: [ + [1653992385.759647][2347:2347] CHIP:DMG: AttributePathIB = + [1653992385.759678][2347:2347] CHIP:DMG: { + [1653992385.759745][2347:2347] CHIP:DMG: Endpoint = 0x1, + [1653992385.759781][2347:2347] CHIP:DMG: Cluster = 0x403, + [1653992385.759859][2347:2347] CHIP:DMG: Attribute = 0x0000_0001, + [1653992385.759918][2347:2347] CHIP:DMG: } + [1653992385.759971][2347:2347] CHIP:DMG: + [1653992385.760000][2347:2347] CHIP:DMG: ], + [1653992385.760049][2347:2347] CHIP:DMG: + [1653992385.760100][2347:2347] CHIP:DMG: isFabricFiltered = true, + [1653992385.760125][2347:2347] CHIP:DMG: InteractionModelRevision = 1 + [1653992385.760168][2347:2347] CHIP:DMG: } + + + ./chip-tool pressuremeasurement read max-measured-value 1 1 + + verify the " max-measured-value response" on the TH (all-cluster-app) log: + + [1653992415.580348][2347:2347] CHIP:IM: Received Read request + [1653992415.580414][2347:2347] CHIP:DMG: ReadRequestMessage = + [1653992415.580442][2347:2347] CHIP:DMG: { + [1653992415.580473][2347:2347] CHIP:DMG: AttributePathIBs = + [1653992415.580501][2347:2347] CHIP:DMG: [ + [1653992415.580534][2347:2347] CHIP:DMG: AttributePathIB = + [1653992415.580563][2347:2347] CHIP:DMG: { + [1653992415.580602][2347:2347] CHIP:DMG: Endpoint = 0x1, + [1653992415.580674][2347:2347] CHIP:DMG: Cluster = 0x403, + [1653992415.580713][2347:2347] CHIP:DMG: Attribute = 0x0000_0002, + [1653992415.580746][2347:2347] CHIP:DMG: } + [1653992415.580786][2347:2347] CHIP:DMG: + [1653992415.580812][2347:2347] CHIP:DMG: ], + [1653992415.580852][2347:2347] CHIP:DMG: + [1653992415.580879][2347:2347] CHIP:DMG: isFabricFiltered = true, + [1653992415.580913][2347:2347] CHIP:DMG: InteractionModelRevision = 1 + [1653992415.580936][2347:2347] CHIP:DMG: } + disabled: true + + - label: + "DUT reads all supported optional attributes from TH one at a time in + a manufacturer specific order." + PICS: PRS.C.AO-READ + verification: | + OPTIONAL ATTRIBUTES ARE NOT IMPLEMENTED IN SDK, If Implemented we will get the expected outcome that is value of below attributes as per Spec + + + Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) + + TH receives the read command and knows this attribute for this cluster and provides a plausable value, DUT processes the values and operates normally + + ./chip-tool pressuremeasurement read tolerance 1 1 + ./chip-tool pressuremeasurement read scaled-value 1 1 + ./chip-tool pressuremeasurement read min-scaled-value 1 1 + ./chip-tool pressuremeasurement read max-scaled-value 1 1 + ./chip-tool pressuremeasurement read scaled-tolerance 1 1 + ./chip-tool pressuremeasurement read scale 1 1 + disabled: true + + - label: + "DUT writes a suitable value to all supported mandatory attributes on + the TH one at a time in a manufacturer specific order." + PICS: PRS.C.AM-WRITE + verification: | + This cluster doesn"t have any writable attributes + disabled: true + + - label: + "DUT writes a suitable value to all supported optional attributes on + the TH one at a time in a manufacturer specific order." + PICS: PRS.C.AO-WRITE + verification: | + This cluster doesn"t have any writable attributes + disabled: true + + - label: + "Configure TH such that it implements mandatory and none of the + optional attributes of the server-side of the cluster, and that it + also reflects this in global attributes such as FeatureMap and + AttributeList. Commission DUT to TH again." + PICS: "" + verification: | + Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) + + + TH receives the read command and knows this attribute for this cluster and provides a plausable value, DUT processes the values and operates normally + + + ./chip-tool pressuremeasurement read feature-map 1 1 + verify the " feature-map response" on the TH (all-cluster-minimal-app) log: + + [1678873303.474810][348369:348369] CHIP:EM: Handling via exchange: 59017r, Delegate: 0x55713c07aca8 + [1678873303.474829][348369:348369] CHIP:IM: Received Read request + [1678873303.474872][348369:348369] CHIP:DMG: ReadRequestMessage = + [1678873303.474880][348369:348369] CHIP:DMG: { + [1678873303.474885][348369:348369] CHIP:DMG: AttributePathIBs = + [1678873303.474894][348369:348369] CHIP:DMG: [ + [1678873303.474900][348369:348369] CHIP:DMG: AttributePathIB = + [1678873303.474908][348369:348369] CHIP:DMG: { + [1678873303.474915][348369:348369] CHIP:DMG: Endpoint = 0x1, + [1678873303.474922][348369:348369] CHIP:DMG: Cluster = 0x403, + [1678873303.474930][348369:348369] CHIP:DMG: Attribute = 0x0000_FFFC, + [1678873303.474936][348369:348369] CHIP:DMG: } + [1678873303.474944][348369:348369] CHIP:DMG: + [1678873303.474950][348369:348369] CHIP:DMG: ], + [1678873303.474959][348369:348369] CHIP:DMG: + [1678873303.474966][348369:348369] CHIP:DMG: isFabricFiltered = true, + [1678873303.474972][348369:348369] CHIP:DMG: InteractionModelRevision = 1 + [1678873303.474978][348369:348369] CHIP:DMG: }, + [1678873303.475012][348369:348369] CHIP:DMG: IM RH moving to [GeneratingReports] + [1678873303.475045][348369:348369] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1678873303.475054][348369:348369] CHIP:DMG: Cluster 403, Attribute fffc is dirty + + ./chip-tool pressuremeasurement read attribute-list 1 1 + verify the " attribute-list response" on the TH (all-cluster-minimal-app) log: + + [1659606175.282588][7312:7312] CHIP:EM: Handling via exchange: 12368r, Delegate: 0xaaaaad2c4f68 + [1659606175.282635][7312:7312] CHIP:IM: Received Read request + [1659606175.282718][7312:7312] CHIP:DMG: ReadRequestMessage = + [1659606175.282746][7312:7312] CHIP:DMG: { + [1659606175.282768][7312:7312] CHIP:DMG: AttributePathIBs = + [1659606175.282794][7312:7312] CHIP:DMG: [ + [1659606175.282818][7312:7312] CHIP:DMG: AttributePathIB = + [1659606175.282846][7312:7312] CHIP:DMG: { + [1659606175.282874][7312:7312] CHIP:DMG: Endpoint = 0x1, + [1659606175.282910][7312:7312] CHIP:DMG: Cluster = 0x403, + [1659606175.282946][7312:7312] CHIP:DMG: Attribute = 0x0000_FFFB, + [1659606175.282975][7312:7312] CHIP:DMG: } + [1659606175.283004][7312:7312] CHIP:DMG: + [1659606175.283029][7312:7312] CHIP:DMG: ], + [1659606175.283056][7312:7312] CHIP:DMG: + [1659606175.283083][7312:7312] CHIP:DMG: isFabricFiltered = true, + [1659606175.283108][7312:7312] CHIP:DMG: InteractionModelRevision = 1 + [1659606175.283132][7312:7312] CHIP:DMG: }, + [1659606175.283211][7312:7312] CHIP:DMG: IM RH moving to [GeneratingReports] + [1659606175.283312][7312:7312] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1659606175.283343][7312:7312] CHIP:DMG: Cluster 403, Attribute fffb is dirty + [1659606175.283364][7312:7312] CHIP:DMG: Reading attribute: Cluster=0x0000_0403 Endpoint=1 AttributeId=0x0000_FFFB (expanded=0) + + + + + ./chip-tool pressuremeasurement read measured-value 1 1 + + verify the " measured-value response" on the TH (all-cluster-minimal-app) log: + + [1653992317.047323][2347:2347] CHIP:IM: Received Read request + [1653992317.047382][2347:2347] CHIP:DMG: ReadRequestMessage = + [1653992317.047457][2347:2347] CHIP:DMG: { + [1653992317.047480][2347:2347] CHIP:DMG: AttributePathIBs = + [1653992317.047507][2347:2347] CHIP:DMG: [ + [1653992317.047531][2347:2347] CHIP:DMG: AttributePathIB = + [1653992317.047563][2347:2347] CHIP:DMG: { + [1653992317.047592][2347:2347] CHIP:DMG: Endpoint = 0x1, + [1653992317.047657][2347:2347] CHIP:DMG: Cluster = 0x403, + [1653992317.047695][2347:2347] CHIP:DMG: Attribute = 0x0000_0000, + [1653992317.047725][2347:2347] CHIP:DMG: } + [1653992317.047774][2347:2347] CHIP:DMG: + [1653992317.047803][2347:2347] CHIP:DMG: ], + [1653992317.047831][2347:2347] CHIP:DMG: + [1653992317.047859][2347:2347] CHIP:DMG: isFabricFiltered = true, + [1653992317.047884][2347:2347] CHIP:DMG: InteractionModelRevision = 1 + [1653992317.047908][2347:2347] CHIP:DMG: }, + [1653992317.047995][2347:2347] CHIP:DMG: IM RH moving to [GeneratingReports] + + ./chip-tool pressuremeasurement read min-measured-value 1 1 + + verify the " min-measured-value response" on the TH (all-cluster-minimal-app) log: + + [1653992385.759474][2347:2347] CHIP:IM: Received Read request + [1653992385.759533][2347:2347] CHIP:DMG: ReadRequestMessage = + [1653992385.759561][2347:2347] CHIP:DMG: { + [1653992385.759584][2347:2347] CHIP:DMG: AttributePathIBs = + [1653992385.759618][2347:2347] CHIP:DMG: [ + [1653992385.759647][2347:2347] CHIP:DMG: AttributePathIB = + [1653992385.759678][2347:2347] CHIP:DMG: { + [1653992385.759745][2347:2347] CHIP:DMG: Endpoint = 0x1, + [1653992385.759781][2347:2347] CHIP:DMG: Cluster = 0x403, + [1653992385.759859][2347:2347] CHIP:DMG: Attribute = 0x0000_0001, + [1653992385.759918][2347:2347] CHIP:DMG: } + [1653992385.759971][2347:2347] CHIP:DMG: + [1653992385.760000][2347:2347] CHIP:DMG: ], + [1653992385.760049][2347:2347] CHIP:DMG: + [1653992385.760100][2347:2347] CHIP:DMG: isFabricFiltered = true, + [1653992385.760125][2347:2347] CHIP:DMG: InteractionModelRevision = 1 + [1653992385.760168][2347:2347] CHIP:DMG: }, + + + ./chip-tool pressuremeasurement read max-measured-value 1 1 + + verify the " max-measured-value response" on the TH (all-cluster-minimal-app) log: + + [1653992415.580348][2347:2347] CHIP:IM: Received Read request + [1653992415.580414][2347:2347] CHIP:DMG: ReadRequestMessage = + [1653992415.580442][2347:2347] CHIP:DMG: { + [1653992415.580473][2347:2347] CHIP:DMG: AttributePathIBs = + [1653992415.580501][2347:2347] CHIP:DMG: [ + [1653992415.580534][2347:2347] CHIP:DMG: AttributePathIB = + [1653992415.580563][2347:2347] CHIP:DMG: { + [1653992415.580602][2347:2347] CHIP:DMG: Endpoint = 0x1, + [1653992415.580674][2347:2347] CHIP:DMG: Cluster = 0x403, + [1653992415.580713][2347:2347] CHIP:DMG: Attribute = 0x0000_0002, + [1653992415.580746][2347:2347] CHIP:DMG: } + [1653992415.580786][2347:2347] CHIP:DMG: + [1653992415.580812][2347:2347] CHIP:DMG: ], + [1653992415.580852][2347:2347] CHIP:DMG: + [1653992415.580879][2347:2347] CHIP:DMG: isFabricFiltered = true, + [1653992415.580913][2347:2347] CHIP:DMG: InteractionModelRevision = 1 + [1653992415.580936][2347:2347] CHIP:DMG: }," + disabled: true + + - label: + "DUT reads all supported optional attributes from TH one at a time in + a manufacturer specific order." + PICS: PRS.C.AO-READ + verification: | + TH all-clusters-minimal-app does not support optional attributes, if implemted we will get "General error: 0x86 (UNSUPPORTED_ATTRIBUTE)" as output when we read following attributes. + + + Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) + + + TH receives the read command and knows this attribute for this cluster and provides a plausable value, DUT processes the values and operates normally + + ./chip-tool pressuremeasurement read tolerance 1 1 + ./chip-tool pressuremeasurement read scaled-value 1 1 + ./chip-tool pressuremeasurement read min-scaled-value 1 1 + ./chip-tool pressuremeasurement read max-scaled-value 1 1 + ./chip-tool pressuremeasurement read scaled-tolerance 1 1 + ./chip-tool pressuremeasurement read scale 1 1 + disabled: true + + - label: + "DUT writes a suitable value to all supported optional attributes on + the TH one at a time in a manufacturer specific order." + PICS: PRS.C.AO-WRITE + verification: | + This cluster doesn"t have any writable attributes + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_PRS_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_PRS_3_1_Simulated.yaml deleted file mode 100644 index a04f15f6592839..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_PRS_3_1_Simulated.yaml +++ /dev/null @@ -1,222 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 34.3.1. [TC-PRS-3.1] Attributes with Client as DUT - -config: - nodeId: 0x12344321 - cluster: "Pressure Measurement" - endpoint: 0 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "Read attribute: MeasuredValue" - wait: "readAttribute" - attribute: "MeasuredValue" - - - label: "Read attribute: MinMeasuredValue" - wait: "readAttribute" - attribute: "MinMeasuredValue" - - - label: "Read attribute: MaxMeasuredValue" - wait: "readAttribute" - attribute: "MaxMeasuredValue" - - - label: "Read attribute: Tolerance" - wait: "readAttribute" - attribute: "Tolerance" - - - label: "Read attribute: ScaledValue" - wait: "readAttribute" - attribute: "ScaledValue" - - - label: "Read attribute: MinScaledValue" - wait: "readAttribute" - attribute: "MinScaledValue" - - - label: "Read attribute: MaxScaledValue" - wait: "readAttribute" - attribute: "MaxScaledValue" - - - label: "Read attribute: ScaledTolerance" - wait: "readAttribute" - attribute: "ScaledTolerance" - - - label: "Read attribute: Scale" - wait: "readAttribute" - attribute: "Scale" - - - label: - "Configure TH such that it implements mandatory and none of the - optional attributes of the server-side of the cluster, and that it - also reflects this in global attributes such as FeatureMap and - AttributeList.Commission DUT to TH again." - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - - TH receives the read command and knows this attribute for this cluster and provides a plausable value, DUT processes the values and operates normally - - ./chip-tool pressuremeasurement read attribute-list 1 1 - - verify the " attribute-list response" on the TH (all-cluster-minimal-app) log: - - [1659606175.282588][7312:7312] CHIP:EM: Handling via exchange: 12368r, Delegate: 0xaaaaad2c4f68 - [1659606175.282635][7312:7312] CHIP:IM: Received Read request - [1659606175.282718][7312:7312] CHIP:DMG: ReadRequestMessage = - [1659606175.282746][7312:7312] CHIP:DMG: { - [1659606175.282768][7312:7312] CHIP:DMG: AttributePathIBs = - [1659606175.282794][7312:7312] CHIP:DMG: [ - [1659606175.282818][7312:7312] CHIP:DMG: AttributePathIB = - [1659606175.282846][7312:7312] CHIP:DMG: { - [1659606175.282874][7312:7312] CHIP:DMG: Endpoint = 0x1, - [1659606175.282910][7312:7312] CHIP:DMG: Cluster = 0x403, - [1659606175.282946][7312:7312] CHIP:DMG: Attribute = 0x0000_FFFB, - [1659606175.282975][7312:7312] CHIP:DMG: } - [1659606175.283004][7312:7312] CHIP:DMG: - [1659606175.283029][7312:7312] CHIP:DMG: ], - [1659606175.283056][7312:7312] CHIP:DMG: - [1659606175.283083][7312:7312] CHIP:DMG: isFabricFiltered = true, - [1659606175.283108][7312:7312] CHIP:DMG: InteractionModelRevision = 1 - [1659606175.283132][7312:7312] CHIP:DMG: }, - [1659606175.283211][7312:7312] CHIP:DMG: IM RH moving to [GeneratingReports] - [1659606175.283312][7312:7312] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1659606175.283343][7312:7312] CHIP:DMG: Cluster 403, Attribute fffb is dirty - [1659606175.283364][7312:7312] CHIP:DMG: Reading attribute: Cluster=0x0000_0403 Endpoint=1 AttributeId=0x0000_FFFB (expanded=0) - - - - - ./chip-tool pressuremeasurement read measured-value 1 1 - - verify the " measured-value response" on the TH (all-cluster-minimal-app) log: - - [1653992317.047323][2347:2347] CHIP:IM: Received Read request - [1653992317.047382][2347:2347] CHIP:DMG: ReadRequestMessage = - [1653992317.047457][2347:2347] CHIP:DMG: { - [1653992317.047480][2347:2347] CHIP:DMG: AttributePathIBs = - [1653992317.047507][2347:2347] CHIP:DMG: [ - [1653992317.047531][2347:2347] CHIP:DMG: AttributePathIB = - [1653992317.047563][2347:2347] CHIP:DMG: { - [1653992317.047592][2347:2347] CHIP:DMG: Endpoint = 0x1, - [1653992317.047657][2347:2347] CHIP:DMG: Cluster = 0x403, - [1653992317.047695][2347:2347] CHIP:DMG: Attribute = 0x0000_0000, - [1653992317.047725][2347:2347] CHIP:DMG: } - [1653992317.047774][2347:2347] CHIP:DMG: - [1653992317.047803][2347:2347] CHIP:DMG: ], - [1653992317.047831][2347:2347] CHIP:DMG: - [1653992317.047859][2347:2347] CHIP:DMG: isFabricFiltered = true, - [1653992317.047884][2347:2347] CHIP:DMG: InteractionModelRevision = 1 - [1653992317.047908][2347:2347] CHIP:DMG: }, - [1653992317.047995][2347:2347] CHIP:DMG: IM RH moving to [GeneratingReports] - - ./chip-tool pressuremeasurement read min-measured-value 1 1 - - verify the " min-measured-value response" on the TH (all-cluster-minimal-app) log: - - [1653992385.759474][2347:2347] CHIP:IM: Received Read request - [1653992385.759533][2347:2347] CHIP:DMG: ReadRequestMessage = - [1653992385.759561][2347:2347] CHIP:DMG: { - [1653992385.759584][2347:2347] CHIP:DMG: AttributePathIBs = - [1653992385.759618][2347:2347] CHIP:DMG: [ - [1653992385.759647][2347:2347] CHIP:DMG: AttributePathIB = - [1653992385.759678][2347:2347] CHIP:DMG: { - [1653992385.759745][2347:2347] CHIP:DMG: Endpoint = 0x1, - [1653992385.759781][2347:2347] CHIP:DMG: Cluster = 0x403, - [1653992385.759859][2347:2347] CHIP:DMG: Attribute = 0x0000_0001, - [1653992385.759918][2347:2347] CHIP:DMG: } - [1653992385.759971][2347:2347] CHIP:DMG: - [1653992385.760000][2347:2347] CHIP:DMG: ], - [1653992385.760049][2347:2347] CHIP:DMG: - [1653992385.760100][2347:2347] CHIP:DMG: isFabricFiltered = true, - [1653992385.760125][2347:2347] CHIP:DMG: InteractionModelRevision = 1 - [1653992385.760168][2347:2347] CHIP:DMG: }, - - - ./chip-tool pressuremeasurement read max-measured-value 1 1 - - verify the " max-measured-value response" on the TH (all-cluster-minimal-app) log: - - [1653992415.580348][2347:2347] CHIP:IM: Received Read request - [1653992415.580414][2347:2347] CHIP:DMG: ReadRequestMessage = - [1653992415.580442][2347:2347] CHIP:DMG: { - [1653992415.580473][2347:2347] CHIP:DMG: AttributePathIBs = - [1653992415.580501][2347:2347] CHIP:DMG: [ - [1653992415.580534][2347:2347] CHIP:DMG: AttributePathIB = - [1653992415.580563][2347:2347] CHIP:DMG: { - [1653992415.580602][2347:2347] CHIP:DMG: Endpoint = 0x1, - [1653992415.580674][2347:2347] CHIP:DMG: Cluster = 0x403, - [1653992415.580713][2347:2347] CHIP:DMG: Attribute = 0x0000_0002, - [1653992415.580746][2347:2347] CHIP:DMG: } - [1653992415.580786][2347:2347] CHIP:DMG: - [1653992415.580812][2347:2347] CHIP:DMG: ], - [1653992415.580852][2347:2347] CHIP:DMG: - [1653992415.580879][2347:2347] CHIP:DMG: isFabricFiltered = true, - [1653992415.580913][2347:2347] CHIP:DMG: InteractionModelRevision = 1 - [1653992415.580936][2347:2347] 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: - "DUT reads all supported optional attributes from TH one at a time in - a manufacturer specific order" - verification: | - TH all-clusters-minimal-app does not support optional attributes, if implemted we will get "General error: 0x86 (UNSUPPORTED_ATTRIBUTE)" as output when we read following attributes. - - - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - - TH receives the read command and knows this attribute for this cluster and provides a plausable value, DUT processes the values and operates normally - - ./chip-tool pressuremeasurement read tolerance 1 1 - ./chip-tool pressuremeasurement read scaled-value 1 1 - ./chip-tool pressuremeasurement read min-scaled-value 1 1 - ./chip-tool pressuremeasurement read max-scaled-value 1 1 - ./chip-tool pressuremeasurement read scaled-tolerance 1 1 - ./chip-tool pressuremeasurement read scale 1 1 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT writes a suitable value to all supported optional attributes on - the TH one at a time in a manufacturer specific order" - verification: | - This cluster doesn't have any writable attributes - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_PSCFG_3_1.yaml b/src/app/tests/suites/certification/Test_TC_PSCFG_3_1.yaml new file mode 100644 index 00000000000000..b6ce480ddcecd4 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_PSCFG_3_1.yaml @@ -0,0 +1,193 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default + +name: 65.3.1. [TC-PSCFG-3.1] Attributes with client as DUT + +PICS: + - PSCFG.C + - PSCFG.C.AM-READ + - PSCFG.C.AO-READ + - PSCFG.C.AM-WRITE + - PSCFG.C.AO-WRITE + +config: + nodeId: 0x12344321 + cluster: "Basic Information" + endpoint: 0 + +tests: + - label: "Note" + verification: | + For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. + disabled: true + + - label: + "DUT reads all supported mandatory attributes from TH one at a time in + a manufacturer specific order." + PICS: PSCFG.C.AM-READ + verification: | + Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) + + ./chip-tool powersourceconfiguration read sources 1 0 + + verify the " sources response" on the TH (all-cluster-app) log: + + [1650881032.387446][2715:2715] CHIP:IM: Received Read request + [1650881032.387500][2715:2715] CHIP:DMG: ReadRequestMessage = + [1650881032.387527][2715:2715] CHIP:DMG: { + [1650881032.387549][2715:2715] CHIP:DMG: AttributePathIBs = + [1650881032.387578][2715:2715] CHIP:DMG: [ + [1650881032.387602][2715:2715] CHIP:DMG: AttributePathIB = + [1650881032.387629][2715:2715] CHIP:DMG: { + [1650881032.387657][2715:2715] CHIP:DMG: Endpoint = 0x0, + [1650881032.387690][2715:2715] CHIP:DMG: Cluster = 0x2e, + [1650881032.387722][2715:2715] CHIP:DMG: Attribute = 0x0000_0000, + [1650881032.387750][2715:2715] CHIP:DMG: } + [1650881032.387781][2715:2715] CHIP:DMG: + [1650881032.387807][2715:2715] CHIP:DMG: ], + [1650881032.387836][2715:2715] CHIP:DMG: + [1650881032.387862][2715:2715] CHIP:DMG: isFabricFiltered = true, + [1650881032.387887][2715:2715] CHIP:DMG: InteractionModelRevision = 1 + [1650881032.387910][2715:2715] CHIP:DMG: }, + [1650881032.387979][2715:2715] CHIP:DMG: IM RH moving to [GeneratingReports] + [1650881032.388058][2715:2715] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1650881032.388087][2715:2715] CHIP:DMG: Cluster 2e, Attribute 0 is dirty + [1650881032.388109][2715:2715] CHIP:DMG: Reading attribute: Cluster=0x0000_002E Endpoint=0 AttributeId=0x0000_0000 (expanded=0) + disabled: true + + - label: + "DUT reads all supported optional attributes from TH one at a time in + a manufacturer specific order." + PICS: PSCFG.C.AO-READ + verification: | + This cluster doesn"t have any optional attribute + disabled: true + + - label: + "DUT writes a suitable value to all supported mandatory attributes on + the TH one at a time in a manufacturer specific order." + PICS: PSCFG.C.AM-WRITE + verification: | + This cluster doesn"t have any writable attributes + disabled: true + + - label: + "DUT writes a suitable value to all supported optional attributes on + the TH one at a time in a manufacturer specific order." + PICS: PSCFG.C.AO-WRITE + verification: | + This cluster doesn"t have any optional attribute + disabled: true + + - label: + "Configure TH such that it implements mandatory and none of the + optional attributes of the server-side of the cluster, and that it + also reflects this in global attributes such as FeatureMap and + AttributeList. Commission DUT to TH again." + verification: | + Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) + + + ./chip-tool powersourceconfiguration read attribute-list 1 0 + + Verify the attribute-list response the TH (all-cluster-minimal-app) log: + + [1663147271.622589][2750:2750] CHIP:IM: Received Read request + [1663147271.622666][2750:2750] CHIP:DMG: ReadRequestMessage = + [1663147271.622692][2750:2750] CHIP:DMG: { + [1663147271.622714][2750:2750] CHIP:DMG: AttributePathIBs = + [1663147271.622739][2750:2750] CHIP:DMG: [ + [1663147271.622789][2750:2750] CHIP:DMG: AttributePathIB = + [1663147271.622821][2750:2750] CHIP:DMG: { + [1663147271.622849][2750:2750] CHIP:DMG: Endpoint = 0x0, + [1663147271.622880][2750:2750] CHIP:DMG: Cluster = 0x2e, + [1663147271.622914][2750:2750] CHIP:DMG: Attribute = 0x0000_FFFB, + [1663147271.622943][2750:2750] CHIP:DMG: } + [1663147271.622971][2750:2750] CHIP:DMG: + [1663147271.622996][2750:2750] CHIP:DMG: ], + [1663147271.623023][2750:2750] CHIP:DMG: + [1663147271.623049][2750:2750] CHIP:DMG: isFabricFiltered = true, + [1663147271.623074][2750:2750] CHIP:DMG: InteractionModelRevision = 1 + [1663147271.623097][2750:2750] CHIP:DMG: }, + [1663147271.623168][2750:2750] CHIP:DMG: IM RH moving to [GeneratingReports] + [1663147271.623246][2750:2750] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1663147271.623274][2750:2750] CHIP:DMG: Cluster 2e, Attribute fffb is dirty + + ./chip-tool powersourceconfiguration read feature-map 1 0 + + Verify the feature-map response the TH (all-cluster-minimal-app) log: + + [1676551043.650050][58234:58234] CHIP:IM: Received Read request + [1676551043.650118][58234:58234] CHIP:DMG: ReadRequestMessage = + [1676551043.650132][58234:58234] CHIP:DMG: { + [1676551043.650139][58234:58234] CHIP:DMG: AttributePathIBs = + [1676551043.650148][58234:58234] CHIP:DMG: [ + [1676551043.650155][58234:58234] CHIP:DMG: AttributePathIB = + [1676551043.650164][58234:58234] CHIP:DMG: { + [1676551043.650174][58234:58234] CHIP:DMG: Endpoint = 0x0, + [1676551043.650183][58234:58234] CHIP:DMG: Cluster = 0x2e, + [1676551043.650193][58234:58234] CHIP:DMG: Attribute = 0x0000_FFFC, + [1676551043.650203][58234:58234] CHIP:DMG: } + [1676551043.650218][58234:58234] CHIP:DMG: + [1676551043.650227][58234:58234] CHIP:DMG: ], + [1676551043.650241][58234:58234] CHIP:DMG: + [1676551043.650251][58234:58234] CHIP:DMG: isFabricFiltered = true, + [1676551043.650261][58234:58234] CHIP:DMG: InteractionModelRevision = 1 + [1676551043.650269][58234:58234] CHIP:DMG: }, + + + + ./chip-tool powersourceconfiguration read sources 1 0 + + verify the " sources response" on the TH (all-cluster-minimal-app) log: + + [1650881032.387446][2715:2715] CHIP:IM: Received Read request + [1650881032.387500][2715:2715] CHIP:DMG: ReadRequestMessage = + [1650881032.387527][2715:2715] CHIP:DMG: { + [1650881032.387549][2715:2715] CHIP:DMG: AttributePathIBs = + [1650881032.387578][2715:2715] CHIP:DMG: [ + [1650881032.387602][2715:2715] CHIP:DMG: AttributePathIB = + [1650881032.387629][2715:2715] CHIP:DMG: { + [1650881032.387657][2715:2715] CHIP:DMG: Endpoint = 0x0, + [1650881032.387690][2715:2715] CHIP:DMG: Cluster = 0x2e, + [1650881032.387722][2715:2715] CHIP:DMG: Attribute = 0x0000_0000, + [1650881032.387750][2715:2715] CHIP:DMG: } + [1650881032.387781][2715:2715] CHIP:DMG: + [1650881032.387807][2715:2715] CHIP:DMG: ], + [1650881032.387836][2715:2715] CHIP:DMG: + [1650881032.387862][2715:2715] CHIP:DMG: isFabricFiltered = true, + [1650881032.387887][2715:2715] CHIP:DMG: InteractionModelRevision = 1 + [1650881032.387910][2715:2715] CHIP:DMG: }, + [1650881032.387979][2715:2715] CHIP:DMG: IM RH moving to [GeneratingReports] + [1650881032.388058][2715:2715] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1650881032.388087][2715:2715] CHIP:DMG: Cluster 2e, Attribute 0 is dirty + [1650881032.388109][2715:2715] CHIP:DMG: Reading attribute: Cluster=0x0000_002E Endpoint=0 AttributeId=0x0000_0000 (expanded=0) + disabled: true + + - label: + "DUT reads all supported optional attributes from TH one at a time in + a manufacturer specific order." + PICS: PSCFG.C.AO-READ + verification: | + This cluster doesn"t have any optional attribute + disabled: true + + - label: + "DUT writes a suitable value to all supported optional attributes on + the TH one at a time in a manufacturer specific order." + PICS: PSCFG.C.AO-WRITE + verification: | + This cluster doesn"t have any writable attributes + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_PSCFG_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_PSCFG_3_1_Simulated.yaml deleted file mode 100644 index bf053511b5aa85..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_PSCFG_3_1_Simulated.yaml +++ /dev/null @@ -1,136 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 65.3.1. [TC-PSCFG-3.1] Attributes with client as DUT - -PICS: - - PSCFG.C - - PSCFG.C.AM-READ - - PSCFG.C.AO-READ - - PSCFG.C.AM-WRITE - - PSCFG.C.AO-WRITE - -config: - nodeId: 0x12344321 - cluster: "Power Source Configuration" - endpoint: 0 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "Read attribute: Sources" - wait: "readAttribute" - attribute: "Sources" - - - label: - "Configure TH such that it implements mandatory and none of the - optional attributes of the server-side of the cluster, and that it - also reflects this in global attributes such as FeatureMap and - AttributeList. Commission DUT to TH again." - verification: | - Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) - - - ./chip-tool powersourceconfiguration read attribute-list 1 0 - - Verify the ReadRequestMessage the TH (all-cluster-minimal-app) log: - - [1663147271.622589][2750:2750] CHIP:IM: Received Read request - [1663147271.622666][2750:2750] CHIP:DMG: ReadRequestMessage = - [1663147271.622692][2750:2750] CHIP:DMG: { - [1663147271.622714][2750:2750] CHIP:DMG: AttributePathIBs = - [1663147271.622739][2750:2750] CHIP:DMG: [ - [1663147271.622789][2750:2750] CHIP:DMG: AttributePathIB = - [1663147271.622821][2750:2750] CHIP:DMG: { - [1663147271.622849][2750:2750] CHIP:DMG: Endpoint = 0x0, - [1663147271.622880][2750:2750] CHIP:DMG: Cluster = 0x2e, - [1663147271.622914][2750:2750] CHIP:DMG: Attribute = 0x0000_FFFB, - [1663147271.622943][2750:2750] CHIP:DMG: } - [1663147271.622971][2750:2750] CHIP:DMG: - [1663147271.622996][2750:2750] CHIP:DMG: ], - [1663147271.623023][2750:2750] CHIP:DMG: - [1663147271.623049][2750:2750] CHIP:DMG: isFabricFiltered = true, - [1663147271.623074][2750:2750] CHIP:DMG: InteractionModelRevision = 1 - [1663147271.623097][2750:2750] CHIP:DMG: }, - [1663147271.623168][2750:2750] CHIP:DMG: IM RH moving to [GeneratingReports] - [1663147271.623246][2750:2750] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1663147271.623274][2750:2750] CHIP:DMG: Cluster 2e, Attribute fffb is dirty - - - ./chip-tool powersourceconfiguration read sources 1 0 - - verify the " sources response" on the TH (all-cluster-minimal-app) log: - - [1650881032.387446][2715:2715] CHIP:IM: Received Read request - [1650881032.387500][2715:2715] CHIP:DMG: ReadRequestMessage = - [1650881032.387527][2715:2715] CHIP:DMG: { - [1650881032.387549][2715:2715] CHIP:DMG: AttributePathIBs = - [1650881032.387578][2715:2715] CHIP:DMG: [ - [1650881032.387602][2715:2715] CHIP:DMG: AttributePathIB = - [1650881032.387629][2715:2715] CHIP:DMG: { - [1650881032.387657][2715:2715] CHIP:DMG: Endpoint = 0x0, - [1650881032.387690][2715:2715] CHIP:DMG: Cluster = 0x2e, - [1650881032.387722][2715:2715] CHIP:DMG: Attribute = 0x0000_0000, - [1650881032.387750][2715:2715] CHIP:DMG: } - [1650881032.387781][2715:2715] CHIP:DMG: - [1650881032.387807][2715:2715] CHIP:DMG: ], - [1650881032.387836][2715:2715] CHIP:DMG: - [1650881032.387862][2715:2715] CHIP:DMG: isFabricFiltered = true, - [1650881032.387887][2715:2715] CHIP:DMG: InteractionModelRevision = 1 - [1650881032.387910][2715:2715] CHIP:DMG: }, - [1650881032.387979][2715:2715] CHIP:DMG: IM RH moving to [GeneratingReports] - [1650881032.388058][2715:2715] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 - [1650881032.388087][2715:2715] CHIP:DMG: Cluster 2e, Attribute 0 is dirty - [1650881032.388109][2715:2715] CHIP:DMG: Reading attribute: Cluster=0x0000_002E Endpoint=0 AttributeId=0x0000_0000 (expanded=0) - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT reads all supported optional attributes from TH one at a time in - a manufacturer specific order" - verification: | - This cluster doesn't have any optional attribute - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT writes a suitable value to all supported optional attributes on - the TH one at a time in a manufacturer specific order" - verification: | - This cluster doesn't have any writable attributes - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_PS_2_2.yaml b/src/app/tests/suites/certification/Test_TC_PS_2_2.yaml index 07935dbc0affb2..38ba9412865cd7 100644 --- a/src/app/tests/suites/certification/Test_TC_PS_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_PS_2_2.yaml @@ -53,32 +53,43 @@ tests: - label: "Set up subscription to WiredFaultChange event" PICS: PS.S.E00 && PS.M.ManualWiredFault verification: | - ./chip-tool interactive start - - powersource subscribe-event-by-id 120 3600 1 1 - - Verify on the TH Log: - - [1651671151.484803][6266:6266] CHIP:DMG: SubscribeRequestMessage = - [1651671151.484857][6266:6266] CHIP:DMG: { - [1651671151.484907][6266:6266] CHIP:DMG: KeepSubscriptions = false, - [1651671151.484968][6266:6266] CHIP:DMG: MinIntervalFloorSeconds = 0x78, - [1651671151.485025][6266:6266] CHIP:DMG: MaxIntervalCeilingSeconds = 0xe10, - [1651671151.485069][6266:6266] CHIP:DMG: EventPathIBs = - [1651671151.485134][6266:6266] CHIP:DMG: [ - [1651671151.485185][6266:6266] CHIP:DMG: EventPath = - [1651671151.485246][6266:6266] CHIP:DMG: { - [1651671151.485303][6266:6266] CHIP:DMG: Endpoint = 0x1, - [1651671151.485368][6266:6266] CHIP:DMG: Cluster = 0x2f, - [1651671151.485439][6266:6266] CHIP:DMG: Event = 0x0, - [1651671151.485510][6266:6266] CHIP:DMG: }, - [1651671151.485570][6266:6266] CHIP:DMG: - [1651671151.485620][6266:6266] CHIP:DMG: ], - [1651671151.485679][6266:6266] CHIP:DMG: - [1651671151.485731][6266:6266] CHIP:DMG: isFabricFiltered = true, - [1651671151.485784][6266:6266] CHIP:DMG: InteractionModelRevision = 1 - [1651671151.485827][6266:6266] CHIP:DMG: }, - [1651671151.485956][6266:6266] CHIP:DMG: Final negotiated min/max parameters: Min = 120s, Max = 3600s + Please use Interactive mode to Verify subscription test step + Here the command to enter interactive mode:-- ./chip-tool interactive start + + >>> powersource subscribe-event-by-id 0 2 20 1 1 + + + Verify on the TH Log + + [1678874350.531309][348369:348369] CHIP:DMG: SubscribeRequestMessage = + [1678874350.531317][348369:348369] CHIP:DMG: { + [1678874350.531323][348369:348369] CHIP:DMG: KeepSubscriptions = false, + [1678874350.531331][348369:348369] CHIP:DMG: MinIntervalFloorSeconds = 0x2, + [1678874350.531339][348369:348369] CHIP:DMG: MaxIntervalCeilingSeconds = 0x14, + [1678874350.531345][348369:348369] CHIP:DMG: EventPathIBs = + [1678874350.531356][348369:348369] CHIP:DMG: [ + [1678874350.531363][348369:348369] CHIP:DMG: EventPath = + [1678874350.531371][348369:348369] CHIP:DMG: { + [1678874350.531383][348369:348369] CHIP:DMG: Endpoint = 0x1, + [1678874350.531391][348369:348369] CHIP:DMG: Cluster = 0x2f, + [1678874350.531399][348369:348369] CHIP:DMG: Event = 0x0, + [1678874350.531406][348369:348369] CHIP:DMG: }, + [1678874350.531415][348369:348369] CHIP:DMG: + [1678874350.531421][348369:348369] CHIP:DMG: ], + [1678874350.531432][348369:348369] CHIP:DMG: + [1678874350.531440][348369:348369] CHIP:DMG: isFabricFiltered = true, + [1678874350.531449][348369:348369] CHIP:DMG: InteractionModelRevision = 1 + [1678874350.531455][348369:348369] CHIP:DMG: }, + [1678874350.531490][348369:348369] CHIP:DMG: Final negotiated min/max parameters: Min = 2s, Max = 20s + + [1678874350.531517][348369:348369] CHIP:DMG: IM RH moving to [GeneratingReports] + MessageCounter:108699985 from Retrans Table on exchange 59500r + [1678874350.533233][348369:348369] CHIP:DMG: StatusResponseMessage = + [1678874350.533243][348369:348369] CHIP:DMG: { + [1678874350.533251][348369:348369] CHIP:DMG: Status = 0x00 (SUCCESS), + [1678874350.533258][348369:348369] CHIP:DMG: InteractionModelRevision = 1 + [1678874350.533264][348369:348369] CHIP:DMG: } + [1678874350.533271][348369:348369] CHIP:IM: Received status response, status is 0x00 (SUCCESS) disabled: true - label: "Bring the DUT into a wired fault state." @@ -124,31 +135,42 @@ tests: - label: "Set up subscription to BatFaultChange event" PICS: PS.S.E01 && PS.M.ManualBatFault verification: | - ./chip-tool interactive start - powersource subscribe-event-by-id 0 100 1 1 + Please use Interactive mode to Verify subscription test step + Here the command to enter interactive mode:-- ./chip-tool interactive start + powersource subscribe-event-by-id 1 0 100 1 1 Verify on the TH Log: - SubscribeRequestMessage = - [1651667556.522349][6266:6266] CHIP:DMG: { - [1651667556.522399][6266:6266] CHIP:DMG: KeepSubscriptions = false, - [1651667556.522454][6266:6266] CHIP:DMG: MinIntervalFloorSeconds = 0x0, - [1651667556.522512][6266:6266] CHIP:DMG: MaxIntervalCeilingSeconds = 0x64, - [1651667556.522564][6266:6266] CHIP:DMG: EventPathIBs = - [1651667556.522619][6266:6266] CHIP:DMG: [ - [1651667556.522670][6266:6266] CHIP:DMG: EventPath = - [1651667556.522730][6266:6266] CHIP:DMG: { - [1651667556.522789][6266:6266] CHIP:DMG: Endpoint = 0x1, - [1651667556.522897][6266:6266] CHIP:DMG: Cluster = 0x2f, - [1651667556.522965][6266:6266] CHIP:DMG: Event = 0x1, - [1651667556.523026][6266:6266] CHIP:DMG: }, - [1651667556.523090][6266:6266] CHIP:DMG: - [1651667556.523140][6266:6266] CHIP:DMG: ], - [1651667556.523199][6266:6266] CHIP:DMG: - [1651667556.523243][6266:6266] CHIP:DMG: isFabricFiltered = true, - [1651667556.523296][6266:6266] CHIP:DMG: InteractionModelRevision = 1 - [1651667556.523344][6266:6266] CHIP:DMG: }, - [1651667556.523471][6266:6266] CHIP:DMG: Final negotiated min/max parameters: Min = 0s, Max = 100s + + [1678874454.354931][348369:348369] CHIP:DMG: SubscribeRequestMessage = + [1678874454.354939][348369:348369] CHIP:DMG: { + [1678874454.354947][348369:348369] CHIP:DMG: KeepSubscriptions = false, + [1678874454.354955][348369:348369] CHIP:DMG: MinIntervalFloorSeconds = 0x0, + [1678874454.354962][348369:348369] CHIP:DMG: MaxIntervalCeilingSeconds = 0x64, + [1678874454.354972][348369:348369] CHIP:DMG: EventPathIBs = + [1678874454.354979][348369:348369] CHIP:DMG: [ + [1678874454.354986][348369:348369] CHIP:DMG: EventPath = + [1678874454.354995][348369:348369] CHIP:DMG: { + [1678874454.355007][348369:348369] CHIP:DMG: Endpoint = 0x1, + [1678874454.355016][348369:348369] CHIP:DMG: Cluster = 0x2f, + [1678874454.355024][348369:348369] CHIP:DMG: Event = 0x1, + [1678874454.355031][348369:348369] CHIP:DMG: }, + [1678874454.355039][348369:348369] CHIP:DMG: + [1678874454.355046][348369:348369] CHIP:DMG: ], + [1678874454.355053][348369:348369] CHIP:DMG: + [1678874454.355061][348369:348369] CHIP:DMG: isFabricFiltered = true, + [1678874454.355068][348369:348369] CHIP:DMG: InteractionModelRevision = 1 + [1678874454.355074][348369:348369] CHIP:DMG: }, + [1678874454.355109][348369:348369] CHIP:DMG: Final negotiated min/max parameters: Min = 0s, Max = 100s + + [1678874454.357156][348369:348369] CHIP:DMG: StatusResponseMessage = + [1678874454.357165][348369:348369] CHIP:DMG: { + [1678874454.357174][348369:348369] CHIP:DMG: Status = 0x00 (SUCCESS), + [1678874454.357182][348369:348369] CHIP:DMG: InteractionModelRevision = 1 + [1678874454.357188][348369:348369] CHIP:DMG: } + [1678874454.357197][348369:348369] CHIP:IM: Received status response, status is 0x00 (SUCCESS) + [1678874454.357215][348369:348369] CHIP:DMG: Refresh Subscribe Sync Timer with min 0 seconds and max 100 seconds + [1678874454.357251][348369:348369] CHIP:EM: <<< [E:59501r S:3659 M:108699998 (Ack:239522570)] (S) Msg TX to 1:00 disabled: true - label: "Bring the DUT into a battery fault state." @@ -194,30 +216,39 @@ tests: verification: | ./chip-tool interactive start - powersource subscribe-event-by-id 1 100 1000 1 1 + powersource subscribe-event-by-id 2 100 1000 1 1 Verify on the TH Log: - [1651671068.817350][6266:6266] CHIP:IM: Received Subscribe request - [1651671068.817489][6266:6266] CHIP:DMG: SubscribeRequestMessage = - [1651671068.817529][6266:6266] CHIP:DMG: { - [1651671068.817553][6266:6266] CHIP:DMG: KeepSubscriptions = false, - [1651671068.817612][6266:6266] CHIP:DMG: MinIntervalFloorSeconds = 0x0, - [1651671068.817672][6266:6266] CHIP:DMG: MaxIntervalCeilingSeconds = 0x64, - [1651671068.817707][6266:6266] CHIP:DMG: EventPathIBs = - [1651671068.817734][6266:6266] CHIP:DMG: [ - [1651671068.817769][6266:6266] CHIP:DMG: EventPath = - [1651671068.817830][6266:6266] CHIP:DMG: { - [1651671068.817883][6266:6266] CHIP:DMG: Endpoint = 0x1, - [1651671068.817923][6266:6266] CHIP:DMG: Cluster = 0x2f, - [1651671068.817985][6266:6266] CHIP:DMG: Event = 0x2, - [1651671068.818013][6266:6266] CHIP:DMG: }, - [1651671068.818074][6266:6266] CHIP:DMG: - [1651671068.818129][6266:6266] CHIP:DMG: ], - [1651671068.818159][6266:6266] CHIP:DMG: - [1651671068.818228][6266:6266] CHIP:DMG: isFabricFiltered = true, - [1651671068.818310][6266:6266] CHIP:DMG: InteractionModelRevision = 1 - [1651671068.818336][6266:6266] CHIP:DMG: }, - [1651671068.818414][6266:6266] CHIP:DMG: Final negotiated min/max parameters: Min = 0s, Max = 100s + + [1678874515.570452][348369:348369] CHIP:DMG: SubscribeRequestMessage = + [1678874515.570455][348369:348369] CHIP:DMG: { + [1678874515.570457][348369:348369] CHIP:DMG: KeepSubscriptions = false, + [1678874515.570460][348369:348369] CHIP:DMG: MinIntervalFloorSeconds = 0x64, + [1678874515.570464][348369:348369] CHIP:DMG: MaxIntervalCeilingSeconds = 0x3e8, + [1678874515.570466][348369:348369] CHIP:DMG: EventPathIBs = + [1678874515.570469][348369:348369] CHIP:DMG: [ + [1678874515.570472][348369:348369] CHIP:DMG: EventPath = + [1678874515.570475][348369:348369] CHIP:DMG: { + [1678874515.570478][348369:348369] CHIP:DMG: Endpoint = 0x1, + [1678874515.570481][348369:348369] CHIP:DMG: Cluster = 0x2f, + [1678874515.570484][348369:348369] CHIP:DMG: Event = 0x2, + [1678874515.570487][348369:348369] CHIP:DMG: }, + [1678874515.570490][348369:348369] CHIP:DMG: + [1678874515.570492][348369:348369] CHIP:DMG: ], + [1678874515.570495][348369:348369] CHIP:DMG: + [1678874515.570498][348369:348369] CHIP:DMG: isFabricFiltered = true, + [1678874515.570501][348369:348369] CHIP:DMG: InteractionModelRevision = 1 + [1678874515.570503][348369:348369] CHIP:DMG: }, + [1678874515.570517][348369:348369] CHIP:DMG: Final negotiated min/max parameters: Min = 100s, Max = 1000s + + + MessageCounter:243065879 from Retrans Table on exchange 59503r + [1678874515.571146][348369:348369] CHIP:DMG: StatusResponseMessage = + [1678874515.571148][348369:348369] CHIP:DMG: { + [1678874515.571150][348369:348369] CHIP:DMG: Status = 0x00 (SUCCESS), + [1678874515.571152][348369:348369] CHIP:DMG: InteractionModelRevision = 1 + [1678874515.571154][348369:348369] CHIP:DMG: } + [1678874515.571157][348369:348369] CHIP:IM: Received status response, status is 0x00 (SUCCESS) disabled: true - label: "Bring the DUT into a charge fault state." diff --git a/src/app/tests/suites/certification/Test_TC_PS_3_1.yaml b/src/app/tests/suites/certification/Test_TC_PS_3_1.yaml new file mode 100644 index 00000000000000..cc4b9b2cba3727 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_PS_3_1.yaml @@ -0,0 +1,590 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default + +name: 62.3.1. [TC-PS-3.1] Attributes with client as DUT + +PICS: + - PS.C + - PS.C.AM-READ + - PS.C.AO-READ + - PS.C.AM-WRITE + - PS.C.AO-WRITE + +config: + nodeId: 0x12344321 + cluster: "Basic Information" + endpoint: 0 + +tests: + - label: "Note" + verification: | + For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. + disabled: true + + - label: + "DUT reads all supported mandatory attributes from TH one at a time in + a manufacturer specific order" + PICS: PS.C.AM-READ + verification: | + Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) + + ./chip-tool powersource read status 1 1 + + verify the " status response" on the TH (all-cluster-app) log: + + + [1646155382.977445][33190:33190] CHIP:EM: Received message of type 0x2 with protocolId (0, 1) and MessageCounter:685127 on exchange 16568r + [1646155382.977534][33190:33190] CHIP:EM: Handling via exchange: 16568r, Delegate: 0xaaaace1730c8 + [1646155382.978021][33190:33190] CHIP:IM: Received Read request + [1646155382.978109][33190:33190] CHIP:DMG: ReadRequestMessage = + [1646155382.978143][33190:33190] CHIP:DMG: { + [1646155382.978167][33190:33190] CHIP:DMG: AttributePathIBs = + [1646155382.978204][33190:33190] CHIP:DMG: [ + [1646155382.978309][33190:33190] CHIP:DMG: AttributePathIB = + [1646155382.978369][33190:33190] CHIP:DMG: { + [1646155382.978408][33190:33190] CHIP:DMG: Endpoint = 0x1, + [1646155382.978459][33190:33190] CHIP:DMG: Cluster = 0x2f, + [1646155382.978513][33190:33190] CHIP:DMG: Attribute = 0x0000_0000, + [1646155382.978545][33190:33190] CHIP:DMG: } + [1646155382.978767][33190:33190] CHIP:DMG: + [1646155382.978804][33190:33190] CHIP:DMG: ], + [1646155382.978836][33190:33190] CHIP:DMG: + [1646155382.978872][33190:33190] CHIP:DMG: isFabricFiltered = false, + [1646155382.978901][33190:33190] CHIP:DMG: InteractionModelRevision = 1 + [1646155382.978927][33190:33190] CHIP:DMG: }, + [1646155382.978998][33190:33190] CHIP:DMG: IM RH moving to [GeneratingReports] + [1646155382.979658][33190:33190] CHIP:DMG: Cluster 2f, Attribute 0 is dirty + [1646155382.979729][33190:33190] CHIP:DMG: Reading attribute: Cluster=0x0000_002F Endpoint=1 AttributeId=0x0000_0000 (expanded=0) + [1646155382.979764][33190:33190] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_002F e=1 p=v + [1646010346.974150][33190:33190] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0003 e=1 p=v + + ./chip-tool powersource read order 1 1 + + verify the " order response" on the TH (all-cluster-app) log: + + [1653395573.862606][19412:19412] CHIP:IM: Received Read request + [1653395573.862690][19412:19412] CHIP:DMG: ReadRequestMessage = + [1653395573.862739][19412:19412] CHIP:DMG: { + [1653395573.862779][19412:19412] CHIP:DMG: AttributePathIBs = + [1653395573.862827][19412:19412] CHIP:DMG: [ + [1653395573.862872][19412:19412] CHIP:DMG: AttributePathIB = + [1653395573.862928][19412:19412] CHIP:DMG: { + [1653395573.862980][19412:19412] CHIP:DMG: Endpoint = 0x1, + [1653395573.863037][19412:19412] CHIP:DMG: Cluster = 0x2f, + [1653395573.863101][19412:19412] CHIP:DMG: Attribute = 0x0000_0001, + [1653395573.863161][19412:19412] CHIP:DMG: } + [1653395573.863217][19412:19412] CHIP:DMG: + [1653395573.863267][19412:19412] CHIP:DMG: ], + [1653395573.863319][19412:19412] CHIP:DMG: + [1653395573.863367][19412:19412] CHIP:DMG: isFabricFiltered = true, + [1653395573.863413][19412:19412] CHIP:DMG: InteractionModelRevision = 1 + [1653395573.863456][19412:19412] CHIP:DMG: }, + [1653395573.863589][19412:19412] CHIP:DMG: IM RH moving to [GeneratingReports] + [1653395573.863720][19412:19412] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 + + ./chip-tool powersource read description 1 1 + + verify the " description response" on the TH (all-cluster-app) log: + + CHIP:IM: Received Read request + [1653395620.020314][19412:19412] CHIP:DMG: ReadRequestMessage = + [1653395620.020364][19412:19412] CHIP:DMG: { + [1653395620.020406][19412:19412] CHIP:DMG: AttributePathIBs = + [1653395620.020463][19412:19412] CHIP:DMG: [ + [1653395620.020511][19412:19412] CHIP:DMG: AttributePathIB = + [1653395620.020576][19412:19412] CHIP:DMG: { + [1653395620.020635][19412:19412] CHIP:DMG: Endpoint = 0x1, + [1653395620.020703][19412:19412] CHIP:DMG: Cluster = 0x2f, + [1653395620.020770][19412:19412] CHIP:DMG: Attribute = 0x0000_0002, + [1653395620.020833][19412:19412] CHIP:DMG: } + [1653395620.020893][19412:19412] CHIP:DMG: + [1653395620.020945][19412:19412] CHIP:DMG: ], + [1653395620.020999][19412:19412] CHIP:DMG: + [1653395620.021052][19412:19412] CHIP:DMG: isFabricFiltered = true, + [1653395620.021104][19412:19412] CHIP:DMG: InteractionModelRevision = 1 + [1653395620.021153][19412:19412] CHIP:DMG: }, + [1653395620.021252][19412:19412] CHIP:DMG: IM RH moving to [GeneratingReports] + + + ./chip-tool powersource read bat-charge-level 1 1 + + Verify the ReadRequestMessage on TH(all-clusters-app) log) + + [1663140804.059599][2414:2414] CHIP:IM: Received Read request + [1663140804.059679][2414:2414] CHIP:DMG: ReadRequestMessage = + [1663140804.059706][2414:2414] CHIP:DMG: { + [1663140804.059728][2414:2414] CHIP:DMG: AttributePathIBs = + [1663140804.059754][2414:2414] CHIP:DMG: [ + [1663140804.059779][2414:2414] CHIP:DMG: AttributePathIB = + [1663140804.059828][2414:2414] CHIP:DMG: { + [1663140804.059861][2414:2414] CHIP:DMG: Endpoint = 0x1, + [1663140804.059913][2414:2414] CHIP:DMG: Cluster = 0x2f, + [1663140804.059946][2414:2414] CHIP:DMG: Attribute = 0x0000_000E, + [1663140804.059976][2414:2414] CHIP:DMG: } + [1663140804.060006][2414:2414] CHIP:DMG: + [1663140804.060033][2414:2414] CHIP:DMG: ], + [1663140804.060060][2414:2414] CHIP:DMG: + [1663140804.060087][2414:2414] CHIP:DMG: isFabricFiltered = true, + [1663140804.060111][2414:2414] CHIP:DMG: InteractionModelRevision = 1 + [1663140804.060136][2414:2414] CHIP:DMG: }, + + + ./chip-tool powersource read bat-replacement-needed 1 1 + + Verify the ReadRequestMessage on TH(all-clusters-app) log) + + [1663141268.348233][2414:2414] CHIP:IM: Received Read request + [1663141268.348332][2414:2414] CHIP:DMG: ReadRequestMessage = + [1663141268.348388][2414:2414] CHIP:DMG: { + [1663141268.348418][2414:2414] CHIP:DMG: AttributePathIBs = + [1663141268.348465][2414:2414] CHIP:DMG: [ + [1663141268.348498][2414:2414] CHIP:DMG: AttributePathIB = + [1663141268.348545][2414:2414] CHIP:DMG: { + [1663141268.348584][2414:2414] CHIP:DMG: Endpoint = 0x1, + [1663141268.348637][2414:2414] CHIP:DMG: Cluster = 0x2f, + [1663141268.348685][2414:2414] CHIP:DMG: Attribute = 0x0000_000F, + [1663141268.348735][2414:2414] CHIP:DMG: } + [1663141268.348774][2414:2414] CHIP:DMG: + [1663141268.348820][2414:2414] CHIP:DMG: ], + [1663141268.348857][2414:2414] CHIP:DMG: + [1663141268.348904][2414:2414] CHIP:DMG: isFabricFiltered = true, + [1663141268.348938][2414:2414] CHIP:DMG: InteractionModelRevision = 1 + [1663141268.348982][2414:2414] CHIP:DMG: }, + [1663141268.349086][2414:2414] CHIP:DMG: IM RH moving to [GeneratingReports] + [1663141268.349214][2414:2414] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1663141268.349251][2414:2414] CHIP:DMG: Cluster 2f, Attribute f is dirty + + + ./chip-tool powersource read bat-replaceability 1 1 + + Verify the ReadRequestMessage on TH(all-clusters-app) log + + + [1663141378.115928][2414:2414] CHIP:DMG: ReadRequestMessage = + [1663141378.115978][2414:2414] CHIP:DMG: { + [1663141378.116006][2414:2414] CHIP:DMG: AttributePathIBs = + [1663141378.116050][2414:2414] CHIP:DMG: [ + [1663141378.116080][2414:2414] CHIP:DMG: AttributePathIB = + [1663141378.116124][2414:2414] CHIP:DMG: { + [1663141378.116160][2414:2414] CHIP:DMG: Endpoint = 0x1, + [1663141378.116208][2414:2414] CHIP:DMG: Cluster = 0x2f, + [1663141378.116247][2414:2414] CHIP:DMG: Attribute = 0x0000_0010, + [1663141378.116294][2414:2414] CHIP:DMG: } + [1663141378.116330][2414:2414] CHIP:DMG: + [1663141378.116372][2414:2414] CHIP:DMG: ], + [1663141378.116407][2414:2414] CHIP:DMG: + [1663141378.116450][2414:2414] CHIP:DMG: isFabricFiltered = true, + [1663141378.116481][2414:2414] CHIP:DMG: InteractionModelRevision = 1 + [1663141378.116521][2414:2414] CHIP:DMG: }, + [1663141378.116621][2414:2414] CHIP:DMG: IM RH moving to [GeneratingReports] + disabled: true + + - label: + "DUT reads all supported optional attributes from TH one at a time in + a manufacturer specific order" + PICS: PS.C.AO-READ + verification: | + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE + + + ./chip-tool powersource read wired-assessed-input-voltage 1 1 + + Verify on the TH Log: + General error: 0x86 (UNSUPPORTED_ATTRIBUTE)" + + + ./chip-tool powersource read wired-assessed-input-frequency 1 1 + + Verify on the TH Log: + General error: 0x86 (UNSUPPORTED_ATTRIBUTE)" + + ./chip-tool powersource read wired-current-type 1 1 + + Verify on the TH Log: + General error: 0x86 (UNSUPPORTED_ATTRIBUTE)" + + ./chip-tool powersource read wired-assessed-current 1 1 + + Verify on the TH Log: + General error: 0x86 (UNSUPPORTED_ATTRIBUTE)" + + ./chip-tool powersource read wired-nominal-voltage 1 1 + + Verify on the TH Log: + General error: 0x86 (UNSUPPORTED_ATTRIBUTE)" + + ./chip-tool powersource read wired-maximum-current 1 1 + + Verify on the TH Log: + General error: 0x86 (UNSUPPORTED_ATTRIBUTE)" + + ./chip-tool powersource read wired-present 1 1 + + Verify on the TH Log: + General error: 0x86 (UNSUPPORTED_ATTRIBUTE)" + + ./chip-tool powersource read active-wired-faults 1 1 + + Verify on the TH Log: + General error: 0x86 (UNSUPPORTED_ATTRIBUTE)" + + ./chip-tool powersource read bat-voltage 1 1 + + Verify on the TH Log: + General error: 0x86 (UNSUPPORTED_ATTRIBUTE)" + + ./chip-tool powersource read bat-percent-remaining 1 1 + + Verify on the TH Log: + General error: 0x86 (UNSUPPORTED_ATTRIBUTE)" + + ./chip-tool powersource read bat-time-remaining 1 1 + + Verify on the TH Log: + General error: 0x86 (UNSUPPORTED_ATTRIBUTE)" + + ./chip-tool powersource read bat-present 1 1 + + Verify on the TH Log: + + General error: 0x86 (UNSUPPORTED_ATTRIBUTE) " + + ./chip-tool powersource read active-bat-faults 1 1 + + Verify on the TH Log: + General error: 0x86 (UNSUPPORTED_ATTRIBUTE)" + + ./chip-tool powersource read bat-replacement-description 1 1 + + Verify on the TH Log: + General error: 0x86 (UNSUPPORTED_ATTRIBUTE) " + + ./chip-tool powersource read bat-common-designation 1 1 + + Verify on the TH Log: + General error: 0x86 (UNSUPPORTED_ATTRIBUTE) " + + ./chip-tool powersource read bat-ansidesignation 1 1 + + Verify on the TH Log: + + General error: 0x86 (UNSUPPORTED_ATTRIBUTE) " + + ./chip-tool powersource read bat-iecdesignation 1 1 + + Verify on the TH Log: + General error: 0x86 (UNSUPPORTED_ATTRIBUTE) + + ./chip-tool powersource read bat-approved-chemistry 1 1 + + Verify on the TH Log: + + General error: 0x86 (UNSUPPORTED_ATTRIBUTE) " + + ./chip-tool powersource read bat-capacity 1 1 + + Verify on the TH Log: + General error: 0x86 (UNSUPPORTED_ATTRIBUTE) " + + + ./chip-tool powersource read bat-quantity 1 1 + + Verify on the TH Log: + General error: 0x86 (UNSUPPORTED_ATTRIBUTE) " + + ./chip-tool powersource read bat-charge-state 1 1 + + Verify on the TH Log: + General error: 0x86 (UNSUPPORTED_ATTRIBUTE) " + + ./chip-tool powersource read bat-time-to-full-charge 1 1 + + Verify on the TH Log: + General error: 0x86 (UNSUPPORTED_ATTRIBUTE) " + + ./chip-tool powersource read bat-functional-while-charging 1 1 + + Verify on the TH Log: + General error: 0x86 (UNSUPPORTED_ATTRIBUTE) " + + ./chip-tool powersource read bat-charging-current 1 1 + + Verify on the TH Log: + General error: 0x86 (UNSUPPORTED_ATTRIBUTE) " + + ./chip-tool powersource read active-bat-charge-faults 1 1 + + Verify on the TH Log: + General error: 0x86 (UNSUPPORTED_ATTRIBUTE)" + disabled: true + + - label: + "DUT writes a suitable value to all supported mandatory attributes on + the TH one at a time in a manufacturer specific order" + PICS: PS.C.AM-WRITE + verification: | + This cluster doesn"t have any writable attributes + disabled: true + + - label: + "DUT writes a suitable value to all supported optional attributes on + the TH one at a time in a manufacturer specific order" + PICS: PS.C.AO-WRITE + verification: | + This cluster doesn"t have any writable attributes + disabled: true + + - label: + "Configure TH such that it implements mandatory and none of the + optional attributes of the server-side of the cluster, and that it + also reflects this in global attributes such as FeatureMap and + AttributeList. Commission DUT to TH again" + PICS: "" + verification: | + Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) + + ./chip-tool powersource read feature-map 1 1 + verify the " feature-map response" on the TH (all-cluster-minimal-app) log: + [1678873672.092602][348369:348369] CHIP:IM: Received Read request + [1678873672.092651][348369:348369] CHIP:DMG: ReadRequestMessage = + [1678873672.092660][348369:348369] CHIP:DMG: { + [1678873672.092669][348369:348369] CHIP:DMG: AttributePathIBs = + [1678873672.092680][348369:348369] CHIP:DMG: [ + [1678873672.092706][348369:348369] CHIP:DMG: AttributePathIB = + [1678873672.092715][348369:348369] CHIP:DMG: { + [1678873672.092724][348369:348369] CHIP:DMG: Endpoint = 0x1, + [1678873672.092735][348369:348369] CHIP:DMG: Cluster = 0x2f, + [1678873672.092747][348369:348369] CHIP:DMG: Attribute = 0x0000_FFFC, + [1678873672.092757][348369:348369] CHIP:DMG: } + [1678873672.092770][348369:348369] CHIP:DMG: + [1678873672.092777][348369:348369] CHIP:DMG: ], + [1678873672.092791][348369:348369] CHIP:DMG: + [1678873672.092800][348369:348369] CHIP:DMG: isFabricFiltered = true, + [1678873672.092810][348369:348369] CHIP:DMG: InteractionModelRevision = 1 + [1678873672.092818][348369:348369] CHIP:DMG: }, + [1678873672.092858][348369:348369] CHIP:DMG: IM RH moving to [GeneratingReports] + [1678873672.092892][348369:348369] CHIP:DMG: Building Reports for ReadHandler + + + ./chip-tool powersource read attribute-list 1 0 + + verify the " attribute-list response" on the TH (all-cluster-minimal-app) log: + + [1659596771.124636][2409:2409] CHIP:IM: Received Read request + [1659596771.124765][2409:2409] CHIP:DMG: ReadRequestMessage = + [1659596771.124795][2409:2409] CHIP:DMG: { + [1659596771.124814][2409:2409] CHIP:DMG: AttributePathIBs = + [1659596771.124838][2409:2409] CHIP:DMG: [ + [1659596771.124859][2409:2409] CHIP:DMG: AttributePathIB = + [1659596771.124901][2409:2409] CHIP:DMG: { + [1659596771.124928][2409:2409] CHIP:DMG: Endpoint = 0x0, + [1659596771.124963][2409:2409] CHIP:DMG: Cluster = 0x2f, + [1659596771.124989][2409:2409] CHIP:DMG: Attribute = 0x0000_FFFB, + [1659596771.125020][2409:2409] CHIP:DMG: } + [1659596771.125045][2409:2409] CHIP:DMG: + [1659596771.125077][2409:2409] CHIP:DMG: ], + [1659596771.125102][2409:2409] CHIP:DMG: + [1659596771.125134][2409:2409] CHIP:DMG: isFabricFiltered = true, + [1659596771.125156][2409:2409] CHIP:DMG: InteractionModelRevision = 1 + [1659596771.125177][2409:2409] CHIP:DMG: }, + + + + ./chip-tool powersource read status 1 1 + + verify the " status response" on the TH (all-cluster-minimal-app) log: + + [1646155382.977534][33190:33190] CHIP:EM: Handling via exchange: 16568r, Delegate: 0xaaaace1730c8 + [1646155382.978021][33190:33190] CHIP:IM: Received Read request + [1646155382.978109][33190:33190] CHIP:DMG: ReadRequestMessage = + [1646155382.978143][33190:33190] CHIP:DMG: { + [1646155382.978167][33190:33190] CHIP:DMG: AttributePathIBs = + [1646155382.978204][33190:33190] CHIP:DMG: [ + [1646155382.978309][33190:33190] CHIP:DMG: AttributePathIB = + [1646155382.978369][33190:33190] CHIP:DMG: { + [1646155382.978408][33190:33190] CHIP:DMG: Endpoint = 0x1, + [1646155382.978459][33190:33190] CHIP:DMG: Cluster = 0x2f, + [1646155382.978513][33190:33190] CHIP:DMG: Attribute = 0x0000_0000, + [1646155382.978545][33190:33190] CHIP:DMG: } + [1646155382.978767][33190:33190] CHIP:DMG: + [1646155382.978804][33190:33190] CHIP:DMG: ], + [1646155382.978836][33190:33190] CHIP:DMG: + [1646155382.978872][33190:33190] CHIP:DMG: isFabricFiltered = false, + [1646155382.978901][33190:33190] CHIP:DMG: InteractionModelRevision = 1 + [1646155382.978927][33190:33190] CHIP:DMG: }, + [1646155382.978998][33190:33190] CHIP:DMG: IM RH moving to [GeneratingReports] + [1646155382.979658][33190:33190] CHIP:DMG: Cluster 2f, Attribute 0 is dirty + [1646155382.979729][33190:33190] CHIP:DMG: Reading attribute: Cluster=0x0000_002F Endpoint=1 AttributeId=0x0000_0000 (expanded=0) + [1646155382.979764][33190:33190] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_002F e=1 p=v + [1646010346.974150][33190:33190] CHIP:DMG: AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0003 e=1 p=v + + ./chip-tool powersource read order 1 1 + + verify the " order response" on the TH (all-cluster-minimal-app) log: + + [1653395573.862606][19412:19412] CHIP:IM: Received Read request + [1653395573.862690][19412:19412] CHIP:DMG: ReadRequestMessage = + [1653395573.862739][19412:19412] CHIP:DMG: { + [1653395573.862779][19412:19412] CHIP:DMG: AttributePathIBs = + [1653395573.862827][19412:19412] CHIP:DMG: [ + [1653395573.862872][19412:19412] CHIP:DMG: AttributePathIB = + [1653395573.862928][19412:19412] CHIP:DMG: { + [1653395573.862980][19412:19412] CHIP:DMG: Endpoint = 0x1, + [1653395573.863037][19412:19412] CHIP:DMG: Cluster = 0x2f, + [1653395573.863101][19412:19412] CHIP:DMG: Attribute = 0x0000_0001, + [1653395573.863161][19412:19412] CHIP:DMG: } + [1653395573.863217][19412:19412] CHIP:DMG: + [1653395573.863267][19412:19412] CHIP:DMG: ], + [1653395573.863319][19412:19412] CHIP:DMG: + [1653395573.863367][19412:19412] CHIP:DMG: isFabricFiltered = true, + [1653395573.863413][19412:19412] CHIP:DMG: InteractionModelRevision = 1 + [1653395573.863456][19412:19412] CHIP:DMG: }, + [1653395573.863589][19412:19412] CHIP:DMG: IM RH moving to [GeneratingReports] + [1653395573.863720][19412:19412] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 + + ./chip-tool powersource read description 1 1 + + verify the " description response" on the TH (all-cluster-minimal-app) log: + + CHIP:IM: Received Read request + [1653395620.020314][19412:19412] CHIP:DMG: ReadRequestMessage = + [1653395620.020364][19412:19412] CHIP:DMG: { + [1653395620.020406][19412:19412] CHIP:DMG: AttributePathIBs = + [1653395620.020463][19412:19412] CHIP:DMG: [ + [1653395620.020511][19412:19412] CHIP:DMG: AttributePathIB = + [1653395620.020576][19412:19412] CHIP:DMG: { + [1653395620.020635][19412:19412] CHIP:DMG: Endpoint = 0x1, + [1653395620.020703][19412:19412] CHIP:DMG: Cluster = 0x2f, + [1653395620.020770][19412:19412] CHIP:DMG: Attribute = 0x0000_0002, + [1653395620.020833][19412:19412] CHIP:DMG: } + [1653395620.020893][19412:19412] CHIP:DMG: + [1653395620.020945][19412:19412] CHIP:DMG: ], + [1653395620.020999][19412:19412] CHIP:DMG: + [1653395620.021052][19412:19412] CHIP:DMG: isFabricFiltered = true, + [1653395620.021104][19412:19412] CHIP:DMG: InteractionModelRevision = 1 + [1653395620.021153][19412:19412] CHIP:DMG: }, + [1653395620.021252][19412:19412] CHIP:DMG: IM RH moving to [GeneratingReports] + + + ./chip-tool powersource read bat-charge-level 1 1 + + Verify the ReadRequestMessage on TH(all-clusters-minimal-app) log + + [1663140804.059599][2414:2414] CHIP:IM: Received Read request + [1663140804.059679][2414:2414] CHIP:DMG: ReadRequestMessage = + [1663140804.059706][2414:2414] CHIP:DMG: { + [1663140804.059728][2414:2414] CHIP:DMG: AttributePathIBs = + [1663140804.059754][2414:2414] CHIP:DMG: [ + [1663140804.059779][2414:2414] CHIP:DMG: AttributePathIB = + [1663140804.059828][2414:2414] CHIP:DMG: { + [1663140804.059861][2414:2414] CHIP:DMG: Endpoint = 0x1, + [1663140804.059913][2414:2414] CHIP:DMG: Cluster = 0x2f, + [1663140804.059946][2414:2414] CHIP:DMG: Attribute = 0x0000_000E, + [1663140804.059976][2414:2414] CHIP:DMG: } + [1663140804.060006][2414:2414] CHIP:DMG: + [1663140804.060033][2414:2414] CHIP:DMG: ], + [1663140804.060060][2414:2414] CHIP:DMG: + [1663140804.060087][2414:2414] CHIP:DMG: isFabricFiltered = true, + [1663140804.060111][2414:2414] CHIP:DMG: InteractionModelRevision = 1 + [1663140804.060136][2414:2414] CHIP:DMG: }, + + + ./chip-tool powersource read bat-replacement-needed 1 1 + + Verify the ReadRequestMessage on TH(all-clusters-minimal-app) log + + [1663141268.348233][2414:2414] CHIP:IM: Received Read request + [1663141268.348332][2414:2414] CHIP:DMG: ReadRequestMessage = + [1663141268.348388][2414:2414] CHIP:DMG: { + [1663141268.348418][2414:2414] CHIP:DMG: AttributePathIBs = + [1663141268.348465][2414:2414] CHIP:DMG: [ + [1663141268.348498][2414:2414] CHIP:DMG: AttributePathIB = + [1663141268.348545][2414:2414] CHIP:DMG: { + [1663141268.348584][2414:2414] CHIP:DMG: Endpoint = 0x1, + [1663141268.348637][2414:2414] CHIP:DMG: Cluster = 0x2f, + [1663141268.348685][2414:2414] CHIP:DMG: Attribute = 0x0000_000F, + [1663141268.348735][2414:2414] CHIP:DMG: } + [1663141268.348774][2414:2414] CHIP:DMG: + [1663141268.348820][2414:2414] CHIP:DMG: ], + [1663141268.348857][2414:2414] CHIP:DMG: + [1663141268.348904][2414:2414] CHIP:DMG: isFabricFiltered = true, + [1663141268.348938][2414:2414] CHIP:DMG: InteractionModelRevision = 1 + [1663141268.348982][2414:2414] CHIP:DMG: }, + [1663141268.349086][2414:2414] CHIP:DMG: IM RH moving to [GeneratingReports] + [1663141268.349214][2414:2414] CHIP:DMG: Building Reports for ReadHandler with LastReportGeneration = 0 DirtyGeneration = 0 + [1663141268.349251][2414:2414] CHIP:DMG: Cluster 2f, Attribute f is dirty + + + ./chip-tool powersource read bat-replaceability 1 1 + + Verify the ReadRequestMessage on TH(all-clusters-minimal-app) log + + + [1663141378.115928][2414:2414] CHIP:DMG: ReadRequestMessage = + [1663141378.115978][2414:2414] CHIP:DMG: { + [1663141378.116006][2414:2414] CHIP:DMG: AttributePathIBs = + [1663141378.116050][2414:2414] CHIP:DMG: [ + [1663141378.116080][2414:2414] CHIP:DMG: AttributePathIB = + [1663141378.116124][2414:2414] CHIP:DMG: { + [1663141378.116160][2414:2414] CHIP:DMG: Endpoint = 0x1, + [1663141378.116208][2414:2414] CHIP:DMG: Cluster = 0x2f, + [1663141378.116247][2414:2414] CHIP:DMG: Attribute = 0x0000_0010, + [1663141378.116294][2414:2414] CHIP:DMG: } + [1663141378.116330][2414:2414] CHIP:DMG: + [1663141378.116372][2414:2414] CHIP:DMG: ], + [1663141378.116407][2414:2414] CHIP:DMG: + [1663141378.116450][2414:2414] CHIP:DMG: isFabricFiltered = true, + [1663141378.116481][2414:2414] CHIP:DMG: InteractionModelRevision = 1 + [1663141378.116521][2414:2414] CHIP:DMG: }, + [1663141378.116621][2414:2414] CHIP:DMG: IM RH moving to [GeneratingReports] + disabled: true + + - label: + "DUT reads all supported optional attributes from TH one at a time in + a manufacturer specific order" + PICS: PS.C.AO-READ + verification: | + Product maker needs to provide instructions for how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when DUT is a commissioner/Client) + + + + Verify TH(all-clusters-minimal-app) receives the read command, and responds that this attribute is not available and also DUT is aware that the optional attributes are not available, and does not issue read requests for the attributes which it did read in step 2 + + + ./chip-tool powersource read bat-charge-level 1 1 + + on TH all-clusters-minimal-app verify status response a UNSUPPORTED_ATTRIBUTE + General error: 0x86 (UNSUPPORTED_ATTRIBUTE) + + + ./chip-tool powersource read bat-replacement-needed 1 1 + + on TH all-clusters-minimal-app verify status response a UNSUPPORTED_ATTRIBUTE + General error: 0x86 (UNSUPPORTED_ATTRIBUTE) + + + ./chip-tool powersource read bat-replaceability 1 1 + + on TH all-clusters-minimal-app verify status response a UNSUPPORTED_ATTRIBUTE + General error: 0x86 (UNSUPPORTED_ATTRIBUTE) + disabled: true + + - label: + "DUT writes a suitable value to all supported optional attributes on + the TH one at a time in a manufacturer specific order" + PICS: PS.C.AO-WRITE + verification: | + This cluster doesn"t have any writable attributes + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_PS_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_PS_3_1_Simulated.yaml deleted file mode 100644 index b4db8ff0c8af9e..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_PS_3_1_Simulated.yaml +++ /dev/null @@ -1,156 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 62.3.1. [TC-PS-3.1] Attributes with client as DUT - -PICS: - - PS.C - - PS.C.AM-READ - - PS.C.AO-READ - - PS.C.AM-WRITE - - PS.C.AO-WRITE - -config: - nodeId: 0x12344321 - cluster: "Power Source" - endpoint: 0 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "Read attribute: Status" - wait: "readAttribute" - attribute: "Status" - - - label: "Read attribute: Order" - wait: "readAttribute" - attribute: "Order" - - - label: "Read attribute: Description" - wait: "readAttribute" - attribute: "Description" - - - label: "Read attribute: WiredAssessedInputVoltage" - wait: "readAttribute" - attribute: "WiredAssessedInputVoltage" - - - label: "Read attribute: WiredAssessedInputFrequency" - wait: "readAttribute" - attribute: "WiredAssessedInputFrequency" - - - label: "Read attribute: WiredCurrentType" - wait: "readAttribute" - attribute: "WiredCurrentType" - - - label: "Read attribute: WiredAssessedCurrent" - wait: "readAttribute" - attribute: "WiredAssessedCurrent" - - - label: "Read attribute: WiredNominalVoltage" - wait: "readAttribute" - attribute: "WiredNominalVoltage" - - - label: "Read attribute: WiredPresent" - wait: "readAttribute" - attribute: "WiredPresent" - - - label: "Read attribute: WiredMaximumCurrent" - wait: "readAttribute" - attribute: "WiredMaximumCurrent" - - - label: "Read attribute: ActiveWiredFaults" - wait: "readAttribute" - attribute: "ActiveWiredFaults" - - - label: "Read attribute: BatVoltage" - wait: "readAttribute" - attribute: "BatVoltage" - - - label: "Read attribute: BatPercentRemaining" - wait: "readAttribute" - attribute: "BatPercentRemaining" - - - label: "Read attribute: BatTimeRemaining" - wait: "readAttribute" - attribute: "BatTimeRemaining" - - - label: "Read attribute: BatChargeLevel" - wait: "readAttribute" - attribute: "BatChargeLevel" - - - label: "Read attribute: BatReplacementNeeded" - wait: "readAttribute" - attribute: "BatReplacementNeeded" - - - label: "Read attribute: BatReplaceability" - wait: "readAttribute" - attribute: "BatReplaceability" - - - label: "Read attribute: BatPresent" - wait: "readAttribute" - attribute: "BatPresent" - - - label: "Read attribute: ActiveBatFaults" - wait: "readAttribute" - attribute: "ActiveBatFaults" - - - label: "Read attribute: BatReplacementDescription" - wait: "readAttribute" - attribute: "BatReplacementDescription" - - - label: "Read attribute: BatCommonDesignation" - wait: "readAttribute" - attribute: "BatCommonDesignation" - - - label: "Read attribute: BatANSIDesignation" - wait: "readAttribute" - attribute: "BatANSIDesignation" - - - label: "Read attribute: BatIECDesignation" - wait: "readAttribute" - attribute: "BatIECDesignation" - - - label: "Read attribute: BatApprovedChemistry" - wait: "readAttribute" - attribute: "BatApprovedChemistry" - - - label: "Read attribute: BatCapacity" - wait: "readAttribute" - attribute: "BatCapacity" - - - label: "Read attribute: BatQuantity" - wait: "readAttribute" - attribute: "BatQuantity" - - - label: "Read attribute: BatChargeState" - wait: "readAttribute" - attribute: "BatChargeState" - - - label: "Read attribute: BatTimeToFullCharge" - wait: "readAttribute" - attribute: "BatTimeToFullCharge" - - - label: "Read attribute: BatFunctionalWhileCharging" - wait: "readAttribute" - attribute: "BatFunctionalWhileCharging" - - - label: "Read attribute: BatChargingCurrent" - wait: "readAttribute" - attribute: "BatChargingCurrent" - - - label: "Read attribute: ActiveBatChargeFaults" - wait: "readAttribute" - attribute: "ActiveBatChargeFaults" 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 b872325303cdfc..650cf3e562717e 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 @@ -42,6 +42,7 @@ tests: saveAs: commissionerNodeId - label: "TH adds ACL Operate privileges for Group 0x0103" + PICS: PICS_SDK_CI_ONLY cluster: "Access Control" endpoint: 0 command: "writeAttribute" @@ -65,7 +66,82 @@ 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 cluster: "Group Key Management" endpoint: 0 command: "KeySetWrite" @@ -84,7 +160,53 @@ 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 cluster: "Group Key Management" endpoint: 0 command: "KeySetWrite" @@ -103,7 +225,53 @@ 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 cluster: "Group Key Management" endpoint: 0 command: "writeAttribute" @@ -111,6 +279,63 @@ tests: 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" command: "RemoveAllGroups" @@ -156,6 +381,7 @@ tests: value: "" - label: "TH sends KeySetRead" + PICS: PICS_SDK_CI_ONLY cluster: "Group Key Management" endpoint: 0 command: "KeySetRead" @@ -178,19 +404,82 @@ 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" 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" cluster: "Group Key Management" endpoint: 0 - PICS: G.S.F00 + PICS: G.S.F00 && PICS_SDK_CI_ONLY command: "readAttribute" attribute: "GroupTable" response: @@ -203,16 +492,69 @@ tests: }, ] + - 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" cluster: "Group Key Management" endpoint: 0 - PICS: "!(G.S.F00)" + PICS: PICS_SDK_CI_ONLY && !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" + - label: "TH removes the GroupKeySet" + PICS: PICS_SDK_CI_ONLY cluster: "Group Key Management" endpoint: 0 command: "KeySetRemove" @@ -221,7 +563,53 @@ tests: - 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 cluster: "Group Key Management" endpoint: 0 command: "readAttribute" @@ -229,10 +617,57 @@ tests: 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" command: "RemoveAllGroups" - label: "TH verifies the group has been removed in the GroupTable" + PICS: PICS_SDK_CI_ONLY cluster: "Group Key Management" endpoint: 0 command: "readAttribute" @@ -240,7 +675,54 @@ tests: 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 cluster: "Access Control" endpoint: 0 command: "writeAttribute" @@ -256,3 +738,60 @@ 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 d5abcb70c8a20f..ad43a0c9db46c8 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 @@ -42,6 +42,7 @@ tests: saveAs: commissionerNodeId - label: "TH adds ACL Operate privileges for Group 0x0103" + PICS: PICS_SDK_CI_ONLY cluster: "Access Control" endpoint: 0 command: "writeAttribute" @@ -65,7 +66,82 @@ 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 cluster: "Group Key Management" endpoint: 0 command: "KeySetWrite" @@ -84,7 +160,53 @@ 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 cluster: "Group Key Management" endpoint: 0 command: "writeAttribute" @@ -96,6 +218,63 @@ tests: { 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: + + [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" command: "RemoveAllGroups" @@ -187,10 +366,56 @@ tests: - 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" command: "RemoveAllGroups" - label: "TH removes ACL Operate privileges for Group 0x0103" + PICS: PICS_SDK_CI_ONLY cluster: "Access Control" endpoint: 0 command: "writeAttribute" @@ -206,3 +431,60 @@ 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_6_1.yaml b/src/app/tests/suites/certification/Test_TC_SC_6_1.yaml index 118ca3d83ef2ba..18e8da4e8c569d 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_6_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_6_1.yaml @@ -33,7 +33,6 @@ tests: - label: "Precondition" verification: | - Group Member is commissioned with Admin Execute this step before executing the test steps. ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null },{"fabricIndex": 1, "privilege": 4, "authMode": 3, "subjects": [1], "targets": null }]' 1 0 @@ -327,6 +326,7 @@ tests: - label: "DUT reads GroupKeyMap Attribute from the GroupKeyManagement cluster from TH" + PICS: GRPKEY.C.A0000 verification: | ./chip-tool groupkeymanagement read group-key-map 1 0 @@ -362,6 +362,7 @@ tests: - label: "DUT reads GroupTable attribute from GroupKeyManagement cluster on TH" + PICS: GRPKEY.C.A0001 verification: | ./chip-tool groupkeymanagement read group-table 1 0 diff --git a/src/app/tests/suites/certification/Test_TC_SWTCH_2_2.yaml b/src/app/tests/suites/certification/Test_TC_SWTCH_2_2.yaml index 6d25d8cfbef615..08b7587ad43c44 100644 --- a/src/app/tests/suites/certification/Test_TC_SWTCH_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_SWTCH_2_2.yaml @@ -45,7 +45,7 @@ tests: - label: "Set up subscription to SwitchLatched event" PICS: SWTCH.S.F00 verification: | - On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) + On Raspi platform to trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor DUT should have the capability to generate this event) echo '{"Name":"SwitchLatched","NewPosition":1}' > /tmp/chip_all_clusters_fifo_ (PID of DUT) @@ -69,12 +69,12 @@ tests: - label: "Operator sets switch to first position" PICS: SWTCH.S.F00 verification: | - On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) + On Raspi platform to trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor DUT should have the capability to generate this event) echo '{"Name":"SwitchLatched","NewPosition":0}' > /tmp/chip_all_clusters_fifo_ (PID of DUT) - Verify switch has first position (0) in DUT(all-cluster-app) Log: + Verify SwitchLatched event with NewPosition set to 0 on DUT(all-cluster-app) log: [1659599702.921797][7312:7312] CHIP:IN: SecureSession[0xaaaacdb77710]: MarkAsDefunct Type:2 LSID:24961 [1659599703.232994][7312:7321] CHIP:-: Received payload: "{"Name":"SwitchLatched","NewPosition":0}" @@ -89,7 +89,7 @@ tests: 1. ./chip-tool interactive start 2. switch read current-position 1 1 - Verify current position value as 0 inTH(chip-tool) Log: + Verify CurrentPosition value is 0 in TH(chip-tool) Log: [1646209289.746157][2617:2622] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_0001DataVersion: 1206711661 [1646209289.746228][2617:2622] CHIP:TOO: current position: 0 @@ -98,11 +98,11 @@ tests: - label: "Operator sets switch to second position" PICS: SWTCH.S.F00 verification: | - On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) + On Raspi platform to trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor DUT should have the capability to generate this event) echo '{"Name":"SwitchLatched","NewPosition":1}' > /tmp/chip_all_clusters_fifo_ (PID of DUT) - Verify switch has set to second position (1) in DUT(all-cluster-app) Log: + Verify SwitchLatched event with NewPosition set to 1 on DUT(all-cluster-app) log: [1659600080.279936][7312:7321] CHIP:-: Received payload: "{"Name":"SwitchLatched","NewPosition":1}" [1659600080.280318][7312:7312] CHIP:DMG: Endpoint 1, Cluster 0x0000_003B update version to 1755409c @@ -117,7 +117,7 @@ tests: 1. ./chip-tool interactive start 2. switch read current-position 1 1 - Verify current position value as 1 inTH(chip-tool) Log: + Verify CurrentPosition value is 1 in TH(chip-tool) Log: [1646209289.746157][2617:2622] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_0001DataVersion: 1206711661 [1646209289.746228][2617:2622] CHIP:TOO: current position: 1 @@ -129,10 +129,12 @@ tests: PICS: SWTCH.S.F00 verification: | Raspi device doesn"t support more than 2 position ,so this step is not verifiable by using raspi device + echo '{"Name":"SwitchLatched","NewPosition":2}' > /tmp/chip_all_clusters_fifo_ (PID of DUT) + - On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) - echo '{"Name":"SwitchLatched","NewPosition":2}' > /tmp/chip_all_clusters_fifo_ (PID of DUT) + + Verify SwitchLatched event with NewPosition set to 2 on DUT(all-cluster-app) log: [1659600438.058928][7312:7321] CHIP:-: Received payload: "{"Name":"SwitchLatched","NewPosition":2}" [1659600438.059436][7312:7312] CHIP:DMG: Endpoint 1, Cluster 0x0000_003B update version to 1755409d @@ -159,10 +161,12 @@ tests: Raspi device doesn"t support more than 2 position ,so this step is not verifiable by using raspi device - In Raspi platform to change the switch to third position use the below sample command, Pls use equivalent command on the respective DUT.open one more terminal on DUT side execute the echo command on that terminal. + In Raspi platform to change the switch to third position use the below sample command, its required to use equivalent command on the respective DUT. Open one more terminal on DUT side to execute the echo command . echo '{"Name":"SwitchLatched","NewPosition":3}' > /tmp/chip_all_clusters_fifo_ (PID of DUT) + Verify SwitchLatched event with NewPosition set to 3 on DUT(all-cluster-app) log: + [1659600438.058928][7312:7321] CHIP:-: Received payload: "{"Name":"SwitchLatched","NewPosition":3}" [1659600438.059436][7312:7312] CHIP:DMG: Endpoint 1, Cluster 0x0000_003B update version to 1755409d [1659600438.059519][7312:7312] CHIP:-: The latching switch is moved to a new position:3 @@ -173,7 +177,7 @@ tests: ./chip-tool switch read current-position 1 1 - Verify current position value inTH(chip-tool) Log: + Verify CurrentPosition value in TH(chip-tool) Log: [1659600502.023560][4306:4311] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_0001 DataVersion: 391463069 [1659600502.023631][4306:4311] CHIP:TOO: current position: 3 @@ -182,11 +186,11 @@ tests: - label: "Operator returns switch to first position" PICS: SWTCH.S.F00 verification: | - On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) + On Raspi platform to trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor DUT should have capability to generate this event) echo '{"Name":"SwitchLatched","NewPosition":0}' > /tmp/chip_all_clusters_fifo_ (PID of DUT) - Verify switch has set to first position (0) in DUT(all-cluster-app) Log: + Verify SwitchLatched event with NewPosition set to 0 on DUT(all-cluster-app) log: [1659599702.921797][7312:7312] CHIP:IN: SecureSession[0xaaaacdb77710]: MarkAsDefunct Type:2 LSID:24961 [1659599703.232994][7312:7321] CHIP:-: Received payload: "{"Name":"SwitchLatched","NewPosition":0}" @@ -202,7 +206,7 @@ tests: 2. switch read current-position 1 1 - Verify current position value as 0 inTH(chip-tool) Log: + Verify CurrentPosition value is 0 in TH(chip-tool) Log: [1646209289.746157][2617:2622] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_0001DataVersion: 1206711661 [1646209289.746228][2617:2622] CHIP:TOO: current position: 0 @@ -211,7 +215,7 @@ tests: - label: "Set up subscription to InitialPress event" PICS: SWTCH.S.F01 verification: | - On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) + On Raspi platform to trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor DUT should have the capability to generate this event) echo '{"Name":"InitialPress","NewPosition":0}' > /tmp/chip_all_clusters_fifo_ (PID of DUT) @@ -226,7 +230,7 @@ tests: 1. ./chip-tool interactive start 2. switch subscribe-event initial-press 1 100 1 1 - Verify InitialPress event has been subscribed inTH (chip-tool)Log: + Verify InitialPress event with NewPosition set to 0 on DUT(all-cluster-app) log: [1659612272.121119][4957:4962] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0001 [1659612272.121143][4957:4962] CHIP:TOO: Event number: 131085 @@ -246,10 +250,9 @@ tests: - label: "Read CurrentPosition attribute" PICS: SWTCH.S.F01 verification: | - 1. ./chip-tool interactive start - 2. switch read current-position 1 1 + ./chip-tool switch read current-position 1 1 - Verify current position value as 0 inTH(chip-tool) Log: + Verify CurrentPosition value in TH (chip-tool) Log: [1646209289.746157][2617:2622] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_0001DataVersion: 1206711661 [1646209289.746228][2617:2622] CHIP:TOO: current position: 0 @@ -262,7 +265,7 @@ tests: echo '{"Name":"InitialPress","NewPosition":1}' > /tmp/chip_all_clusters_fifo_ (PID of DUT) - verify InitialPress event with NewPosition set to 1 on DUT(all-cluster-app) log: + Verify InitialPress event with NewPosition set to 1 on DUT(all-cluster-app) log: [1659612460.072098][7312:7321] CHIP:-: Received payload: "{"Name":"InitialPress","NewPosition":1}" [1659612460.072562][7312:7312] CHIP:DMG: Endpoint 1, Cluster 0x0000_003B update version to 175540a5 @@ -274,11 +277,9 @@ tests: - label: "Read CurrentPosition attribute" PICS: SWTCH.S.F01 verification: | - 1. ./chip-tool interactive start - 2. switch read current-position 1 1 - - Verify current position value inTH(chip-tool) Log: + ./chip-tool switch read current-position 1 1 + Verify CurrentPosition value is 1 TH(chip-tool) Log: [1646209289.746157][2617:2622] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_0001DataVersion: 1206711661 [1646209289.746228][2617:2622] CHIP:TOO: current position: 1 disabled: true @@ -286,11 +287,12 @@ tests: - label: "Operator releases switch" PICS: SWTCH.S.F01 verification: | - On Raspi platform To update the state of the simulated switch give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to update the state of the simulated switch. + On Raspi platform to trigger the event give the below command by opening an another terminal in DUT + (Below is the example command developed in all-clusters-app to generate the event, Vendor DUT should have the capability to generate this event) - echo '{"Name":"ShortRelease","PreviousPosition":1}' > /tmp/chip_all_clusters_fifo_ (PID of DUT) + echo "{"Name":"ShortRelease","PreviousPosition":1}" > /tmp/chip_all_clusters_fifo_ (PID of DUT) - verify ShortRelease event with PreviousPosition set to 1 on DUT(all-cluster-app) log: + Verify ShortRelease event with PreviousPosition set to 1 on DUT(all-cluster-app) log: [1669874154.289653][2239:2241] CHIP:-: Received payload: "{"Name":"ShortRelease","PreviousPosition":1}" [1669874154.290189][2239:2239] CHIP:DMG: Endpoint 1, Cluster 0x0000_003B update version to 2c2733fa @@ -302,10 +304,9 @@ tests: - label: "Read CurrentPosition attribute" PICS: SWTCH.S.F01 verification: | - 1. ./chip-tool interactive start - 2. switch read current-position 1 1 + ./chip-tool switch read current-position 1 1 - Verify current position value as 0 inTH(chip-tool) Log: + Verify CurrentPosition value in TH(chip-tool) Log: [1646209289.746157][2617:2622] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_0001DataVersion: 1206711661 [1646209289.746228][2617:2622] CHIP:TOO: current position: 0 @@ -314,22 +315,24 @@ tests: - label: "Set up subscription to InitialPress and ShortRelease events" PICS: SWTCH.S.F01 && SWTCH.S.F02 && !SWTCH.S.F03 verification: | - On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) + On Raspi platform to trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor DUT should have capability to generate this event) - verify InitialPress and ShortRelease events has been subscribed: + Verify InitialPress and ShortRelease events has been subscribed: echo '{"Name":"InitialPress","NewPosition":1}' > /tmp/chip_all_clusters_fifo_ (PID of DUT) - verify InitialPress event with NewPosition set to 1 on DUT(all-cluster-app) log: + + Verify InitialPress event with NewPosition set to 1 on DUT(all-cluster-app) log: [1659686596.526276][2530:2538] CHIP:-: Received payload: "{"Name":"InitialPress","NewPosition":1}" [1659686596.526734][2530:2530] CHIP:DMG: Endpoint 1, Cluster 0x0000_003B update version to ee5e771a [1659686596.526820][2530:2530] CHIP:-: The new position when the momentary switch starts to be pressed:1 [1659686596.526881][2530:2530] CHIP:ZCL: SwitchServer: OnInitialPress - On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) + On Raspi platform to trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor DUT should have capability to generate this event) echo '{"Name":"ShortRelease","PreviousPosition":1}' > /tmp/chip_all_clusters_fifo_ (PID of DUT) - verify ShortRelease event with PreviousPosition set to 1 on DUT(all-cluster-app) log: + + Verify ShortRelease event with PreviousPosition set to 1 on DUT(all-cluster-app) log: [1659686852.011134][2530:2538] CHIP:-: Received payload: "{"Name":"ShortRelease","PreviousPosition":1}" [1659686852.011424][2530:2530] CHIP:DMG: Endpoint 1, Cluster 0x0000_003B update version to ee5e771b @@ -351,7 +354,7 @@ tests: 1. ./chip-tool interactive start 2. switch subscribe-event initial-press 1 100 1 1 - verify InitialPress event with NewPosition set to 1on TH chip-tool log: + Verify InitialPress event with NewPosition set to 1 on TH chip-tool log: [1659686631.947247][3045:3050] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0001 [1659686631.947272][3045:3050] CHIP:TOO: Event number: 23 @@ -370,7 +373,7 @@ tests: 1. ./chip-tool interactive start 2. switch subscribe-event short-release 1 100 1 1 --keepSubscriptions true - verify ShortRelease event with PreviousPosition set to 1 on TH chip-tool log: + Verify ShortRelease event with PreviousPosition set to 1 on TH chip-tool log: [1659686907.770389][3061:3066] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0003 [1659686907.770413][3061:3066] CHIP:TOO: Event number: 24 @@ -385,10 +388,12 @@ tests: "Operator operates switch (keep pressed for long time, e.g. 5 seconds)" PICS: SWTCH.S.F01 && SWTCH.S.F02 && !SWTCH.S.F03 verification: | - On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) + On Raspi platform to trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor DUT should have capability to generate this event) echo '{"Name":"InitialPress","NewPosition":1}' > /tmp/chip_all_clusters_fifo_ (PID of DUT) + Verify InitialPress event with NewPosition set to 1 on DUT(all-cluster-app) log: + [1659686596.526276][2530:2538] CHIP:-: Received payload: "{"Name":"InitialPress","NewPosition":1}" [1659686596.526734][2530:2530] CHIP:DMG: Endpoint 1, Cluster 0x0000_003B update version to ee5e771a [1659686596.526820][2530:2530] CHIP:-: The new position when the momentary switch starts to be pressed:1 @@ -399,7 +404,7 @@ tests: 1. ./chip-tool interactive start 2. switch subscribe-event initial-press 1 100 1 1 - verify InitialPress event with NewPosition set to 1 on TH chip-tool log: + Verify InitialPress event with NewPosition set to 1 on TH chip-tool log: [1659692069.006090][3668:3674] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0001 [1659692069.006114][3668:3674] CHIP:TOO: Event number: 26 @@ -413,10 +418,12 @@ tests: - label: "Operator releases switch" PICS: SWTCH.S.F01 && SWTCH.S.F02 && !SWTCH.S.F03 verification: | - On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) + On Raspi platform to trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor DUT should have capability to generate this event) echo "{"Name":"ShortRelease","PreviousPosition":1}" > /tmp/chip_all_clusters_fifo_ (PID of DUT) + Verify ShortRelease event with PreviousPosition set to 1 on DUT(all-cluster-app) log: + [1659686852.011134][2530:2538] CHIP:-: Received payload: "{"Name":"ShortRelease","PreviousPosition":1}" [1659686852.011424][2530:2530] CHIP:DMG: Endpoint 1, Cluster 0x0000_003B update version to ee5e771b [1659686852.011466][2530:2530] CHIP:-: The the previous value of the CurrentPosition when the momentary switch has been released:1 @@ -427,7 +434,7 @@ tests: 1. ./chip-tool interactive start 2. switch subscribe-event short-release 1 100 1 1 - verify ShortRelease event with PreviousPosition set to 1 on TH chip-tool log: + Verify ShortRelease event with PreviousPosition set to 1 on TH chip-tool log: [1659692123.069593][3675:3680] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0003 [1659692123.069616][3675:3680] CHIP:TOO: Event number: 27 @@ -443,41 +450,48 @@ tests: LongRelease events" PICS: SWTCH.S.F01 && SWTCH.S.F03 verification: | - On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) + On Raspi platform to trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor DUT should have capability to generate this event) echo '{"Name":"InitialPress","NewPosition":1}' > /tmp/chip_all_clusters_fifo_ (PID of DUT) + Verify InitialPress event with NewPosition set to 1 on DUT(all-cluster-app) log: + [1659693098.031462][2530:2538] CHIP:-: Received payload: "{"Name":"InitialPress","NewPosition":1}" [1659693098.031812][2530:2530] CHIP:DMG: Endpoint 1, Cluster 0x0000_003B update version to ee5e7724 [1659693098.031859][2530:2530] CHIP:-: The new position when the momentary switch starts to be pressed:1 [1659693098.031888][2530:2530] CHIP:ZCL: SwitchServer: OnInitialPress - On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) + On Raspi platform to trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor DUT should have capability to generate this event) echo '{"Name":"LongPress","NewPosition":1}' > /tmp/chip_all_clusters_fifo_ (PID of DUT) + Verify LongPress event with NewPosition set to 1 on DUT(all-cluster-app) log: + 1659693130.924755][2530:2538] CHIP:-: Received payload: "{"Name":"LongPress","NewPosition":1}" [1659693130.925030][2530:2530] CHIP:DMG: Endpoint 1, Cluster 0x0000_003B update version to ee5e7725 [1659693130.925064][2530:2530] CHIP:-: The new position when the momentary switch has been pressed for a long time:1 [1659693130.925313][2530:2530] CHIP:ZCL: SwitchServer: OnLongPress - On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) + On Raspi platform to trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor DUT should have capability to generate this event) echo '{"Name":"ShortRelease","PreviousPosition":1}' > /tmp/chip_all_clusters_fifo_ (PID of DUT) + Verify ShortRelease event with PreviousPosition set to 1 on DUT(all-cluster-app) log: + [1659693174.708920][2530:2538] CHIP:-: Received payload: "{"Name":"ShortRelease","PreviousPosition":1}" [1659693174.709388][2530:2530] CHIP:DMG: Endpoint 1, Cluster 0x0000_003B update version to ee5e7726 [1659693174.709479][2530:2530] CHIP:-: The the previous value of the CurrentPosition when the momentary switch has been released:1 [1659693174.709539][2530:2530] CHIP:ZCL: SwitchServer: OnShortRelease - On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) + On Raspi platform to trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor DUT should have capability to generate this event) echo '{"Name":"LongRelease","PreviousPosition":1}' > /tmp/chip_all_clusters_fifo_ (PID of DUT) + Verify LongRelease event with PreviousPosition set to 1 on DUT(all-cluster-app) log: - [1659693203.272969][2530:2538] CHIP:-: Received payload: "{"Name":"LongPress","NewPosition":1}" - [1659693203.273235][2530:2530] CHIP:DMG: Endpoint 1, Cluster 0x0000_003B update version to ee5e7727 - [1659693203.273276][2530:2530] CHIP:-: The new position when the momentary switch has been pressed for a long time:1 - [1659693203.273300][2530:2530] CHIP:ZCL: SwitchServer: OnLongPress + [1674036547.915803][19172:19174] CHIP:-: Received payload: "{"Name":"LongRelease","PreviousPosition":1}" + [1674036547.916262][19172:19172] CHIP:DMG: Endpoint 1, Cluster 0x0000_003B update version to 40105288 + [1674036547.916347][19172:19172] CHIP:-: The the previous value of the CurrentPosition when the momentary switch has been released after having been pressed for a long time:1 + [1674036547.916493][19172:19172] CHIP:ZCL: SwitchServer: OnLongRelease disabled: true - label: "Operator does not operate switch" @@ -494,7 +508,7 @@ tests: 1. ./chip-tool interactive start 2. switch subscribe-event initial-press 1 100 1 1 - verify InitialPress event with NewPosition set to 1 on TH chip-tool log: + Verify InitialPress event with NewPosition set to 1 on TH chip-tool log: [1659692507.869323][3696:3701] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0001 [1659692507.869342][3696:3701] CHIP:TOO: Event number: 28 @@ -513,7 +527,7 @@ tests: 1. ./chip-tool interactive start 2. switch subscribe-event short-release 1 100 1 1 - verify ShortRelease event with PreviousPosition set to 1 on TH chip-tool log: + Verify ShortRelease event with PreviousPosition set to 1 on TH chip-tool log: [1659692890.665344][3721:3726] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0003 [1659692890.665369][3721:3726] CHIP:TOO: Event number: 31 @@ -533,7 +547,7 @@ tests: 1. ./chip-tool interactive start 2. switch subscribe-event initial-press 1 100 1 1 - verify InitialPress event with NewPosition set to 1 on TH chip-tool log: + Verify InitialPress event with NewPosition set to 1 on TH chip-tool log: [1659692507.869323][3696:3701] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0001 [1659692507.869342][3696:3701] CHIP:TOO: Event number: 28 @@ -548,7 +562,7 @@ tests: 1. ./chip-tool interactive start 2. switch subscribe-event long-press 1 100 1 1 - verify longPress event with NewPosition set to 1 on TH chip-tool log: + Verify longPress event with NewPosition set to 1 on TH chip-tool log: [1659692638.993482][3706:3712] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0002 [1659692638.993504][3706:3712] CHIP:TOO: Event number: 30 @@ -567,7 +581,7 @@ tests: 1. ./chip-tool interactive start 2. switch subscribe-event long-release 1 100 1 1 - verify longrelease event with previousPosition set to 1 on TH chip-tool log: + Verify longrelease event with previousPosition set to 1 on TH chip-tool log: [1659693001.739969][3732:3737] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0004 [1659693001.740012][3732:3737] CHIP:TOO: Event number: 32 @@ -583,36 +597,44 @@ tests: MultiPressComplete events" PICS: SWTCH.S.F01 && SWTCH.S.F04 verification: | - On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) + On Raspi platform to trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor DUT should have capability to generate this event) echo '{"Name":"InitialPress","NewPosition":1}' > /tmp/chip_all_clusters_fifo_ (PID of DUT) + Verify InitialPress event with NewPosition set to 1 on DUT(all-cluster-app) log: + [1659693098.031462][2530:2538] CHIP:-: Received payload: "{"Name":"InitialPress","NewPosition":1}" [1659693098.031812][2530:2530] CHIP:DMG: Endpoint 1, Cluster 0x0000_003B update version to ee5e7724 [1659693098.031859][2530:2530] CHIP:-: The new position when the momentary switch starts to be pressed:1 [1659693098.031888][2530:2530] CHIP:ZCL: SwitchServer: OnInitialPress - On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) + On Raspi platform to trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor DUT should have capability to generate this event) echo '{"Name":"ShortRelease","PreviousPosition":1}' > /tmp/chip_all_clusters_fifo_ (PID of DUT) + Verify ShortRelease event with PreviousPosition set to 1 on DUT(all-cluster-app) log: + [1659694387.719620][2530:2538] CHIP:-: Received payload: "{"Name":"ShortRelease","PreviousPosition":1}" [1659694387.720095][2530:2530] CHIP:DMG: Endpoint 1, Cluster 0x0000_003B update version to ee5e7729 [1659694387.720237][2530:2530] CHIP:-: The the previous value of the CurrentPosition when the momentary switch has been released:1 [1659694387.720304][2530:2530] CHIP:ZCL: SwitchServer: OnShortRelease - On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) + On Raspi platform to trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor DUT should have capability to generate this event) echo '{"Name":"MultiPressComplete","PreviousPosition":1,"TotalNumberOfPressesCounted":1}' > /tmp/chip_all_clusters_fifo_ (PID of DUT) + Verify MultiPressComplete event with PreviousPosition set to 1 on DUT(all-cluster-app) log: + [1659694592.347850][2530:2538] CHIP:-: Received payload: "{"Name":"MultiPressComplete","PreviousPosition":1,"TotalNumberOfPressesCounted":1}" [1659694592.348389][2530:2530] CHIP:DMG: Endpoint 1, Cluster 0x0000_003B update version to ee5e772b [1659694592.348481][2530:2530] CHIP:-: The new position when the momentary switch has been pressed in a multi-press sequence:1 - On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) + On Raspi platform to trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor DUT should have capability to generate this event) echo '{"Name":"MultiPressOngoing","NewPosition":1,"CurrentNumberOfPressesCounted":2}' > /tmp/chip_all_clusters_fifo_ (PID of DUT) + Verify MultiPressOngoing event with NewPosition set to 1 on DUT(all-cluster-app) log: + [1659695302.038797][2530:2538] CHIP:-: Received payload: "{"Name":"MultiPressOngoing","NewPosition":1,"CurrentNumberOfPressesCounted":2}" [1659695302.039933][2530:2530] CHIP:DMG: Endpoint 1, Cluster 0x0000_003B update version to ee5e7730 [1659695302.040020][2530:2530] CHIP:-: The new position when the momentary switch has been pressed in a multi-press sequence:1 @@ -636,7 +658,7 @@ tests: 1. ./chip-tool interactive start 2. switch subscribe-event initial-press 1 100 1 1 - verify InitialPress event with NewPosition set to 1 on TH chip-tool log: + Verify InitialPress event with NewPosition set to 1 on TH chip-tool log: [1659694345.040034][3787:3792] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0001 [1659694345.040059][3787:3792] CHIP:TOO: Event number: 37 @@ -654,7 +676,7 @@ tests: 1. ./chip-tool interactive start 2. switch subscribe-event short-release 1 100 1 1 - verify ShortRelease event with PreviousPosition set to 1 on TH chip-tool log: + Verify ShortRelease event with PreviousPosition set to 1 on TH chip-tool log: [1659694426.794832][3797:3802] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0003 [1659694426.794853][3797:3802] CHIP:TOO: Event number: 38 @@ -670,7 +692,7 @@ tests: 1. ./chip-tool interactive start 2. switch subscribe-event multi-press-complete 1 100 1 1 - verify MultiPressComplete event with PreviousPosition set to 1 and TotalNumberOfPressesCounted set to 1 on TH chip-tool log: + Verify MultiPressComplete event with PreviousPosition set to 1 and TotalNumberOfPressesCounted set to 1 on TH chip-tool log: [1659695330.923244][3912:3918] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0005 [1659695330.923264][3912:3918] CHIP:TOO: Event number: 45 @@ -690,7 +712,7 @@ tests: 1. ./chip-tool interactive start 2. switch subscribe-event initial-press 1 100 1 1 - verify InitialPress event with NewPosition set to 1 on TH chip-tool log: + Verify InitialPress event with NewPosition set to 1 on TH chip-tool log: [1659695901.066563][3955:3960] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0001 [1659695901.066583][3955:3960] CHIP:TOO: Event number: 46 @@ -709,7 +731,7 @@ tests: 1. ./chip-tool interactive start 2. switch subscribe-event short-release 1 100 1 1 - verify ShortRelease event with PreviousPosition set to 1 on TH chip-tool log: + Verify ShortRelease event with PreviousPosition set to 1 on TH chip-tool log: [1659694426.794832][3797:3802] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0003 [1659694426.794853][3797:3802] CHIP:TOO: Event number: 38 @@ -728,7 +750,7 @@ tests: 1. ./chip-tool interactive start 2. switch subscribe-event initial-press 1 100 1 1 - verify InitialPress event with NewPosition set to 1on TH chip-tool log: + Verify InitialPress event with NewPosition set to 1 on TH chip-tool log: [1659694345.040034][3787:3792] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0001 [1659694345.040059][3787:3792] CHIP:TOO: Event number: 37 @@ -742,7 +764,7 @@ tests: 1. ./chip-tool interactive start 2. switch subscribe-event multi-press-ongoing 1 100 1 1 - verify MultiPressongoing event with NewPosition set to 1 and CurrentNumberOfPressesCounted set to 2 on TH chip-tool log: + Verify MultiPressongoing event with NewPosition set to 1 and CurrentNumberOfPressesCounted set to 2 on TH chip-tool log: [1659695330.923244][3912:3918] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0005 [1659695330.923264][3912:3918] CHIP:TOO: Event number: 45 @@ -762,7 +784,7 @@ tests: 1. ./chip-tool interactive start 2. switch subscribe-event short-release 1 100 1 1 - verify ShortRelease event with PreviousPosition set to 1 on TH chip-tool log: + Verify ShortRelease event with PreviousPosition set to 1 on TH chip-tool log: [1659696223.568247][3981:3986] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0003 [1659696223.568272][3981:3986] CHIP:TOO: Event number: 53 @@ -773,7 +795,7 @@ tests: [1659696223.568397][3981:3986] CHIP:TOO: } - On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) + On Raspi platform to trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor DUT should have capability to generate this event) echo '{"Name":"MultiPressComplete","PreviousPosition":1,"TotalNumberOfPressesCounted":2}' > /tmp/chip_all_clusters_fifo_ (PID of DUT) @@ -782,7 +804,7 @@ tests: 1. ./chip-tool interactive start 2. switch subscribe-event multi-press-complete 1 100 1 1 - verify MultiPressComplete event with PreviousPosition set to 1 and TotalNumberOfPressesCounted set to 2 on TH chip-tool log: + Verify MultiPressComplete event with PreviousPosition set to 1 and TotalNumberOfPressesCounted set to 2 on TH chip-tool log: [1659695330.923244][3912:3918] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0005 [1659695330.923264][3912:3918] CHIP:TOO: Event number: 45 @@ -809,7 +831,7 @@ tests: 1. ./chip-tool interactive start 2. switch subscribe-event initial-press 1 100 1 1 - verify InitialPress event with NewPosition set to 1on TH chip-tool log: + Verify InitialPress event with NewPosition set to 1 on TH chip-tool log: [1659695901.066563][3955:3960] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0001 [1659695901.066583][3955:3960] CHIP:TOO: Event number: 46 @@ -828,7 +850,7 @@ tests: 1. ./chip-tool interactive start 2. switch subscribe-event short-release 1 100 1 1 - verify ShortRelease event with PreviousPosition set to 1 on TH chip-tool log: + Verify ShortRelease event with PreviousPosition set to 1 on TH chip-tool log: [1659694426.794832][3797:3802] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0003 [1659694426.794853][3797:3802] CHIP:TOO: Event number: 38 @@ -847,7 +869,7 @@ tests: 1. ./chip-tool interactive start 2. switch subscribe-event initial-press 1 100 1 1 - verify InitialPress event with NewPosition set to 1on TH chip-tool log: + Verify InitialPress event with NewPosition set to 1 on TH chip-tool log: [1659694345.040034][3787:3792] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0001 [1659694345.040059][3787:3792] CHIP:TOO: Event number: 37 @@ -861,7 +883,7 @@ tests: 1. ./chip-tool interactive start 2. switch subscribe-event multi-press-ongoing 1 100 1 1 - verify MultiPressongoing event with NewPosition set to 1 and CurrentNumberOfPressesCounted set to 2 on TH chip-tool log: + Verify MultiPressongoing event with NewPosition set to 1 and CurrentNumberOfPressesCounted set to 2 on TH chip-tool log: [1659695330.923244][3912:3918] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0005 [1659695330.923264][3912:3918] CHIP:TOO: Event number: 45 @@ -881,7 +903,7 @@ tests: 1. ./chip-tool interactive start 2. switch subscribe-event short-release 1 100 1 1 - verify ShortRelease event with PreviousPosition set to 1 on TH chip-tool log: + Verify ShortRelease event with PreviousPosition set to 1 on TH chip-tool log: [1659694426.794832][3797:3802] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0003 [1659694426.794853][3797:3802] CHIP:TOO: Event number: 38 @@ -900,7 +922,7 @@ tests: 1. ./chip-tool interactive start 2. switch subscribe-event initial-press 1 100 1 1 - verify InitialPress event with NewPosition set to 1on TH chip-tool log: + Verify InitialPress event with NewPosition set to 1 on TH chip-tool log: [1659694345.040034][3787:3792] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0001 [1659694345.040059][3787:3792] CHIP:TOO: Event number: 37 @@ -918,7 +940,7 @@ tests: 1. ./chip-tool interactive start 2. switch subscribe-event multi-press-ongoing 1 100 1 1 - verify MultiPressongoing event with NewPosition set to 1 and CurrentNumberOfPressesCounted set to 3 on TH chip-tool log: + Verify MultiPressongoing event with NewPosition set to 1 and CurrentNumberOfPressesCounted set to 3 on TH chip-tool log: [1659698336.786184][4081:4086] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0005 [1659698336.786209][4081:4086] CHIP:TOO: Event number: 57 @@ -938,8 +960,6 @@ tests: 1. ./chip-tool interactive start 2. switch subscribe-event short-release 1 100 1 1 - verify ShortRelease event with PreviousPosition set to 1 on TH chip-tool log: - [1659696223.568247][3981:3986] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0003 [1659696223.568272][3981:3986] CHIP:TOO: Event number: 53 [1659696223.568296][3981:3986] CHIP:TOO: Priority: Info @@ -962,8 +982,6 @@ tests: 1. ./chip-tool interactive start 2. switch subscribe-event multi-press-complete 1 100 1 1 - verify MultiPresscomplete event with previousPosition set to 1 and TotalNumberOfPressesCounted set to 3 on TH chip-tool log: - [1659695330.923244][3912:3918] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0005 [1659695330.923264][3912:3918] CHIP:TOO: Event number: 45 [1659695330.923283][3912:3918] CHIP:TOO: Priority: Info diff --git a/src/app/tests/suites/certification/Test_TC_SWTCH_3_1.yaml b/src/app/tests/suites/certification/Test_TC_SWTCH_3_1.yaml new file mode 100644 index 00000000000000..b9fb7cd461b6fd --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_SWTCH_3_1.yaml @@ -0,0 +1,457 @@ +# Copyright (c) 2021 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default + +name: 74.3.1. [TC-SWTCH-3.1] Global attributes with client as DUT + +PICS: + - SWTCH.C + - SWTCH.C.AM-READ + - SWTCH.C.AO-READ + - SWTCH.C.AM-WRITE + - SWTCH.C.AO-WRITE + +config: + nodeId: 0x12344321 + cluster: "Basic Information" + endpoint: 0 + +tests: + - label: "Note" + verification: | + For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. + disabled: true + + - label: + "DUT reads all supported mandatory attributes from TH one at a time in + a manufacturer specific order." + PICS: SWTCH.C.AM-READ + verification: | + ./chip-tool switch read number-of-positions 1 1 + + Verify TH receives NumberOfPositions attribute response on the TH(all-clusters-app) Log: + ReportDataMessage = + [1671449917.780724][8426:8426] CHIP:DMG: { + [1671449917.780726][8426:8426] CHIP:DMG: AttributeReportIBs = + [1671449917.780731][8426:8426] CHIP:DMG: [ + [1671449917.780734][8426:8426] CHIP:DMG: AttributeReportIB = + [1671449917.780814][8426:8426] CHIP:DMG: { + [1671449917.780821][8426:8426] CHIP:DMG: AttributeDataIB = + [1671449917.780826][8426:8426] CHIP:DMG: { + [1671449917.780830][8426:8426] CHIP:DMG: DataVersion = 0xcfe432fa, + [1671449917.780835][8426:8426] CHIP:DMG: AttributePathIB = + [1671449917.780839][8426:8426] CHIP:DMG: { + [1671449917.780843][8426:8426] CHIP:DMG: Endpoint = 0x1, + [1671449917.780848][8426:8426] CHIP:DMG: Cluster = 0x3b, + [1671449917.780854][8426:8426] CHIP:DMG: Attribute = 0x0000_0000, + [1671449917.780859][8426:8426] CHIP:DMG: } + [1671449917.780864][8426:8426] CHIP:DMG: + [1671449917.780868][8426:8426] CHIP:DMG: Data = 2, + [1671449917.780872][8426:8426] CHIP:DMG: }, + [1671449917.780877][8426:8426] CHIP:DMG: + [1671449917.780880][8426:8426] CHIP:DMG: }, + [1671449917.780886][8426:8426] CHIP:DMG: + [1671449917.780889][8426:8426] CHIP:DMG: ], + [1671449917.780894][8426:8426] CHIP:DMG: + [1671449917.780898][8426:8426] CHIP:DMG: SuppressResponse = true, + [1671449917.780901][8426:8426] CHIP:DMG: InteractionModelRevision = 1 + [1671449917.780904][8426:8426] CHIP:DMG: } + , + + ./chip-tool switch read current-position 1 1 + + Verify TH receives CurrentPosition attribute response on the TH(all-clusters-app) Log: + + [ReportDataMessage = + [1671449960.047834][8426:8426] CHIP:DMG: { + [1671449960.047837][8426:8426] CHIP:DMG: AttributeReportIBs = + [1671449960.047841][8426:8426] CHIP:DMG: [ + [1671449960.047844][8426:8426] CHIP:DMG: AttributeReportIB = + [1671449960.047849][8426:8426] CHIP:DMG: { + [1671449960.047852][8426:8426] CHIP:DMG: AttributeDataIB = + [1671449960.047855][8426:8426] CHIP:DMG: { + [1671449960.047858][8426:8426] CHIP:DMG: DataVersion = 0xcfe432fa, + [1671449960.047861][8426:8426] CHIP:DMG: AttributePathIB = + [1671449960.047865][8426:8426] CHIP:DMG: { + [1671449960.047868][8426:8426] CHIP:DMG: Endpoint = 0x1, + [1671449960.047872][8426:8426] CHIP:DMG: Cluster = 0x3b, + [1671449960.047875][8426:8426] CHIP:DMG: Attribute = 0x0000_0001, + [1671449960.047878][8426:8426] CHIP:DMG: } + [1671449960.047882][8426:8426] CHIP:DMG: + [1671449960.047886][8426:8426] CHIP:DMG: Data = 0, + [1671449960.047889][8426:8426] CHIP:DMG: }, + [1671449960.047893][8426:8426] CHIP:DMG: + [1671449960.047895][8426:8426] CHIP:DMG: }, + [1671449960.047899][8426:8426] CHIP:DMG: + [1671449960.047902][8426:8426] CHIP:DMG: ], + [1671449960.047907][8426:8426] CHIP:DMG: + [1671449960.047910][8426:8426] CHIP:DMG: SuppressResponse = true, + [1671449960.047912][8426:8426] CHIP:DMG: InteractionModelRevision = 1 + [1671449960.047915][8426:8426] CHIP:DMG: } + disabled: true + + - label: + "DUT reads all supported optional attributes from TH one at a time in + a manufacturer specific order." + PICS: SWTCH.C.AO-READ + verification: | + verify on Reference app receives the right response for the data sent in the above commands + + ./chip-tool switch read multi-press-max 1 1 + + Verify TH receives MultiPressMax attribute response on the TH(all-clusters-app) Log: + ReportDataMessage = + [1671450018.221331][8426:8426] CHIP:DMG: { + [1671450018.221335][8426:8426] CHIP:DMG: AttributeReportIBs = + [1671450018.221341][8426:8426] CHIP:DMG: [ + [1671450018.221345][8426:8426] CHIP:DMG: AttributeReportIB = + [1671450018.221352][8426:8426] CHIP:DMG: { + [1671450018.221355][8426:8426] CHIP:DMG: AttributeDataIB = + [1671450018.221360][8426:8426] CHIP:DMG: { + [1671450018.221365][8426:8426] CHIP:DMG: DataVersion = 0xcfe432fa, + [1671450018.221369][8426:8426] CHIP:DMG: AttributePathIB = + [1671450018.221374][8426:8426] CHIP:DMG: { + [1671450018.221378][8426:8426] CHIP:DMG: Endpoint = 0x1, + [1671450018.221383][8426:8426] CHIP:DMG: Cluster = 0x3b, + [1671450018.221388][8426:8426] CHIP:DMG: Attribute = 0x0000_0002, + [1671450018.221393][8426:8426] CHIP:DMG: } + [1671450018.221398][8426:8426] CHIP:DMG: + [1671450018.221404][8426:8426] CHIP:DMG: Data = 2, + [1671450018.221408][8426:8426] CHIP:DMG: }, + [1671450018.221414][8426:8426] CHIP:DMG: + [1671450018.221417][8426:8426] CHIP:DMG: }, + [1671450018.221423][8426:8426] CHIP:DMG: + [1671450018.221427][8426:8426] CHIP:DMG: ], + [1671450018.221433][8426:8426] CHIP:DMG: + [1671450018.221437][8426:8426] CHIP:DMG: SuppressResponse = true, + [1671450018.221441][8426:8426] CHIP:DMG: InteractionModelRevision = 1 + [1671450018.221445][8426:8426] CHIP:DMG: } + disabled: true + + - label: + "DUT writes a suitable value to all supported mandatory attributes on + the TH one at a time in a manufacturer specific order." + PICS: SWTCH.C.AM-WRITE + verification: | + This cluster doesn"t have any writable attributes + disabled: true + + - label: + "DUT writes a suitable value to all supported optional attributes on + the TH one at a time in a manufacturer specific order." + PICS: SWTCH.C.AO-WRITE + verification: | + This cluster doesn"t have any writable attributes + disabled: true + + - label: + "Configure TH such that it implements mandatory and none of the + optional attributes of the server-side of the cluster, and that it + also reflects this in global attributes such as FeatureMap and + AttributeList. Commission DUT to TH again." + verification: | + ./chip-tool switch read feature-map 1 1 + + Verify TH receives FeatureMap attribute response on the TH(all-clusters-minimal-app) Log: + + [1666943977.583820][12769:12769] CHIP:DMG: + [1666943977.583832][12769:12769] CHIP:DMG: ReportDataMessage = + [1666943977.583834][12769:12769] CHIP:DMG: { + [1666943977.583837][12769:12769] CHIP:DMG: AttributeReportIBs = + [1666943977.583842][12769:12769] CHIP:DMG: [ + [1666943977.583844][12769:12769] CHIP:DMG: AttributeReportIB = + [1666943977.583855][12769:12769] CHIP:DMG: { + [1666943977.583857][12769:12769] CHIP:DMG: AttributeDataIB = + [1666943977.583860][12769:12769] CHIP:DMG: { + [1666943977.583864][12769:12769] CHIP:DMG: DataVersion = 0x8c421c49, + [1666943977.583867][12769:12769] CHIP:DMG: AttributePathIB = + [1666943977.583870][12769:12769] CHIP:DMG: { + [1666943977.583873][12769:12769] CHIP:DMG: Endpoint = 0x1, + [1666943977.583877][12769:12769] CHIP:DMG: Cluster = 0x3b, + [1666943977.583880][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFC, + [1666943977.583883][12769:12769] CHIP:DMG: } + [1666943977.583887][12769:12769] CHIP:DMG: + [1666943977.583891][12769:12769] CHIP:DMG: Data = 1, + [1666943977.583893][12769:12769] CHIP:DMG: }, + [1666943977.583897][12769:12769] CHIP:DMG: + [1666943977.583899][12769:12769] CHIP:DMG: }, + [1666943977.583903][12769:12769] CHIP:DMG: + [1666943977.583905][12769:12769] CHIP:DMG: ], + [1666943977.583909][12769:12769] CHIP:DMG: + [1666943977.583911][12769:12769] CHIP:DMG: SuppressResponse = true, + [1666943977.583913][12769:12769] CHIP:DMG: InteractionModelRevision = 1 + + ./chip-tool switch read attribute-list 1 1 + + Verify TH receives AttributeList attribute response on the TH(all-clusters-minimal-app) Log: + + [1676530441.143667][49371:49373] CHIP:DMG: ReportDataMessage = + [1676530441.143670][49371:49373] CHIP:DMG: { + [1676530441.143673][49371:49373] CHIP:DMG: AttributeReportIBs = + [1676530441.143678][49371:49373] CHIP:DMG: [ + [1676530441.143680][49371:49373] CHIP:DMG: AttributeReportIB = + [1676530441.143685][49371:49373] CHIP:DMG: { + [1676530441.143688][49371:49373] CHIP:DMG: AttributeDataIB = + [1676530441.143691][49371:49373] CHIP:DMG: { + [1676530441.143694][49371:49373] CHIP:DMG: DataVersion = 0xa9b15b57, + [1676530441.143697][49371:49373] CHIP:DMG: AttributePathIB = + [1676530441.143701][49371:49373] CHIP:DMG: { + [1676530441.143704][49371:49373] CHIP:DMG: Endpoint = 0x1, + [1676530441.143707][49371:49373] CHIP:DMG: Cluster = 0x3b, + [1676530441.143711][49371:49373] CHIP:DMG: Attribute = 0x0000_FFFB, + [1676530441.143713][49371:49373] CHIP:DMG: } + [1676530441.143717][49371:49373] CHIP:DMG: + [1676530441.143720][49371:49373] CHIP:DMG: Data = [ + [1676530441.143723][49371:49373] CHIP:DMG: + [1676530441.143726][49371:49373] CHIP:DMG: ], + [1676530441.143729][49371:49373] CHIP:DMG: }, + [1676530441.143733][49371:49373] CHIP:DMG: + [1676530441.143736][49371:49373] CHIP:DMG: }, + [1676530441.143742][49371:49373] CHIP:DMG: + [1676530441.143744][49371:49373] CHIP:DMG: AttributeReportIB = + [1676530441.143749][49371:49373] CHIP:DMG: { + [1676530441.143751][49371:49373] CHIP:DMG: AttributeDataIB = + [1676530441.143754][49371:49373] CHIP:DMG: { + [1676530441.143757][49371:49373] CHIP:DMG: DataVersion = 0xa9b15b57, + [1676530441.143760][49371:49373] CHIP:DMG: AttributePathIB = + [1676530441.143763][49371:49373] CHIP:DMG: { + [1676530441.143766][49371:49373] CHIP:DMG: Endpoint = 0x1, + [1676530441.143769][49371:49373] CHIP:DMG: Cluster = 0x3b, + [1676530441.143772][49371:49373] CHIP:DMG: Attribute = 0x0000_FFFB, + [1676530441.143775][49371:49373] CHIP:DMG: ListIndex = Null, + [1676530441.143778][49371:49373] CHIP:DMG: } + [1676530441.143782][49371:49373] CHIP:DMG: + [1676530441.143785][49371:49373] CHIP:DMG: Data = 0, + [1676530441.143788][49371:49373] CHIP:DMG: }, + [1676530441.143792][49371:49373] CHIP:DMG: + [1676530441.143794][49371:49373] CHIP:DMG: }, + [1676530441.143800][49371:49373] CHIP:DMG: + [1676530441.143803][49371:49373] CHIP:DMG: AttributeReportIB = + [1676530441.143807][49371:49373] CHIP:DMG: { + [1676530441.143809][49371:49373] CHIP:DMG: AttributeDataIB = + [1676530441.143812][49371:49373] CHIP:DMG: { + [1676530441.143815][49371:49373] CHIP:DMG: DataVersion = 0xa9b15b57, + [1676530441.143818][49371:49373] CHIP:DMG: AttributePathIB = + [1676530441.143820][49371:49373] CHIP:DMG: { + [1676530441.143823][49371:49373] CHIP:DMG: Endpoint = 0x1, + [1676530441.143827][49371:49373] CHIP:DMG: Cluster = 0x3b, + [1676530441.143830][49371:49373] CHIP:DMG: Attribute = 0x0000_FFFB, + [1676530441.143833][49371:49373] CHIP:DMG: ListIndex = Null, + [1676530441.143835][49371:49373] CHIP:DMG: } + [1676530441.143839][49371:49373] CHIP:DMG: + [1676530441.143842][49371:49373] CHIP:DMG: Data = 1, + [1676530441.143845][49371:49373] CHIP:DMG: }, + [1676530441.143849][49371:49373] CHIP:DMG: + [1676530441.143851][49371:49373] CHIP:DMG: }, + [1676530441.143857][49371:49373] CHIP:DMG: + [1676530441.143860][49371:49373] CHIP:DMG: AttributeReportIB = + [1676530441.143865][49371:49373] CHIP:DMG: { + [1676530441.143868][49371:49373] CHIP:DMG: AttributeDataIB = + [1676530441.143872][49371:49373] CHIP:DMG: { + [1676530441.143877][49371:49373] CHIP:DMG: DataVersion = 0xa9b15b57, + [1676530441.143880][49371:49373] CHIP:DMG: AttributePathIB = + [1676530441.143885][49371:49373] CHIP:DMG: { + [1676530441.143891][49371:49373] CHIP:DMG: Endpoint = 0x1, + [1676530441.143896][49371:49373] CHIP:DMG: Cluster = 0x3b, + [1676530441.143900][49371:49373] CHIP:DMG: Attribute = 0x0000_FFFB, + [1676530441.143903][49371:49373] CHIP:DMG: ListIndex = Null, + [1676530441.143906][49371:49373] CHIP:DMG: } + [1676530441.143910][49371:49373] CHIP:DMG: + [1676530441.143913][49371:49373] CHIP:DMG: Data = 65528, + [1676530441.143916][49371:49373] CHIP:DMG: }, + [1676530441.143920][49371:49373] CHIP:DMG: + [1676530441.143922][49371:49373] CHIP:DMG: }, + [1676530441.143929][49371:49373] CHIP:DMG: + [1676530441.143931][49371:49373] CHIP:DMG: AttributeReportIB = + [1676530441.143937][49371:49373] CHIP:DMG: { + [1676530441.143940][49371:49373] CHIP:DMG: AttributeDataIB = + [1676530441.143944][49371:49373] CHIP:DMG: { + [1676530441.143948][49371:49373] CHIP:DMG: DataVersion = 0xa9b15b57, + [1676530441.143952][49371:49373] CHIP:DMG: AttributePathIB = + [1676530441.143956][49371:49373] CHIP:DMG: { + [1676530441.143959][49371:49373] CHIP:DMG: Endpoint = 0x1, + [1676530441.143964][49371:49373] CHIP:DMG: Cluster = 0x3b, + [1676530441.143969][49371:49373] CHIP:DMG: Attribute = 0x0000_FFFB, + [1676530441.143973][49371:49373] CHIP:DMG: ListIndex = Null, + [1676530441.143978][49371:49373] CHIP:DMG: } + [1676530441.143983][49371:49373] CHIP:DMG: + [1676530441.143988][49371:49373] CHIP:DMG: Data = 65529, + [1676530441.143992][49371:49373] CHIP:DMG: }, + [1676530441.143998][49371:49373] CHIP:DMG: + [1676530441.144001][49371:49373] CHIP:DMG: }, + [1676530441.144010][49371:49373] CHIP:DMG: + [1676530441.144012][49371:49373] CHIP:DMG: AttributeReportIB = + [1676530441.144018][49371:49373] CHIP:DMG: { + [1676530441.144021][49371:49373] CHIP:DMG: AttributeDataIB = + [1676530441.144024][49371:49373] CHIP:DMG: { + [1676530441.144027][49371:49373] CHIP:DMG: DataVersion = 0xa9b15b57, + [1676530441.144030][49371:49373] CHIP:DMG: AttributePathIB = + [1676530441.144033][49371:49373] CHIP:DMG: { + [1676530441.144036][49371:49373] CHIP:DMG: Endpoint = 0x1, + [1676530441.144041][49371:49373] CHIP:DMG: Cluster = 0x3b, + [1676530441.144046][49371:49373] CHIP:DMG: Attribute = 0x0000_FFFB, + [1676530441.144050][49371:49373] CHIP:DMG: ListIndex = Null, + [1676530441.144054][49371:49373] CHIP:DMG: } + [1676530441.144061][49371:49373] CHIP:DMG: + [1676530441.144065][49371:49373] CHIP:DMG: Data = 65530, + [1676530441.144068][49371:49373] CHIP:DMG: }, + [1676530441.144075][49371:49373] CHIP:DMG: + [1676530441.144078][49371:49373] CHIP:DMG: }, + [1676530441.144086][49371:49373] CHIP:DMG: + [1676530441.144089][49371:49373] CHIP:DMG: AttributeReportIB = + [1676530441.144096][49371:49373] CHIP:DMG: { + [1676530441.144099][49371:49373] CHIP:DMG: AttributeDataIB = + [1676530441.144103][49371:49373] CHIP:DMG: { + [1676530441.144107][49371:49373] CHIP:DMG: DataVersion = 0xa9b15b57, + [1676530441.144109][49371:49373] CHIP:DMG: AttributePathIB = + [1676530441.144112][49371:49373] CHIP:DMG: { + [1676530441.144115][49371:49373] CHIP:DMG: Endpoint = 0x1, + [1676530441.144119][49371:49373] CHIP:DMG: Cluster = 0x3b, + [1676530441.144122][49371:49373] CHIP:DMG: Attribute = 0x0000_FFFB, + [1676530441.144127][49371:49373] CHIP:DMG: ListIndex = Null, + [1676530441.144131][49371:49373] CHIP:DMG: } + [1676530441.144136][49371:49373] CHIP:DMG: + [1676530441.144141][49371:49373] CHIP:DMG: Data = 65531, + [1676530441.144145][49371:49373] CHIP:DMG: }, + [1676530441.144152][49371:49373] CHIP:DMG: + [1676530441.144156][49371:49373] CHIP:DMG: }, + [1676530441.144165][49371:49373] CHIP:DMG: + [1676530441.144169][49371:49373] CHIP:DMG: AttributeReportIB = + [1676530441.144176][49371:49373] CHIP:DMG: { + [1676530441.144179][49371:49373] CHIP:DMG: AttributeDataIB = + [1676530441.144184][49371:49373] CHIP:DMG: { + [1676530441.144188][49371:49373] CHIP:DMG: DataVersion = 0xa9b15b57, + [1676530441.144192][49371:49373] CHIP:DMG: AttributePathIB = + [1676530441.144197][49371:49373] CHIP:DMG: { + [1676530441.144200][49371:49373] CHIP:DMG: Endpoint = 0x1, + [1676530441.144203][49371:49373] CHIP:DMG: Cluster = 0x3b, + [1676530441.144208][49371:49373] CHIP:DMG: Attribute = 0x0000_FFFB, + [1676530441.144212][49371:49373] CHIP:DMG: ListIndex = Null, + [1676530441.144216][49371:49373] CHIP:DMG: } + [1676530441.144222][49371:49373] CHIP:DMG: + [1676530441.144226][49371:49373] CHIP:DMG: Data = 65532, + [1676530441.144230][49371:49373] CHIP:DMG: }, + [1676530441.144237][49371:49373] CHIP:DMG: + [1676530441.144240][49371:49373] CHIP:DMG: }, + [1676530441.144248][49371:49373] CHIP:DMG: + [1676530441.144251][49371:49373] CHIP:DMG: AttributeReportIB = + [1676530441.144258][49371:49373] CHIP:DMG: { + [1676530441.144261][49371:49373] CHIP:DMG: AttributeDataIB = + [1676530441.144265][49371:49373] CHIP:DMG: { + [1676530441.144270][49371:49373] CHIP:DMG: DataVersion = 0xa9b15b57, + [1676530441.144273][49371:49373] CHIP:DMG: AttributePathIB = + [1676530441.144278][49371:49373] CHIP:DMG: { + [1676530441.144283][49371:49373] CHIP:DMG: Endpoint = 0x1, + [1676530441.144288][49371:49373] CHIP:DMG: Cluster = 0x3b, + [1676530441.144293][49371:49373] CHIP:DMG: Attribute = 0x0000_FFFB, + [1676530441.144297][49371:49373] CHIP:DMG: ListIndex = Null, + [1676530441.144301][49371:49373] CHIP:DMG: } + [1676530441.144306][49371:49373] CHIP:DMG: + [1676530441.144310][49371:49373] CHIP:DMG: Data = 65533, + [1676530441.144314][49371:49373] CHIP:DMG: }, + [1676530441.144319][49371:49373] CHIP:DMG: + [1676530441.144322][49371:49373] CHIP:DMG: }, + [1676530441.144329][49371:49373] CHIP:DMG: + [1676530441.144332][49371:49373] CHIP:DMG: ], + [1676530441.144352][49371:49373] CHIP:DMG: + [1676530441.144356][49371:49373] CHIP:DMG: SuppressResponse = true, + [1676530441.144359][49371:49373] CHIP:DMG: InteractionModelRevision = 1 + [1676530441.144362][49371:49373] CHIP:DMG: } + + + + ./chip-tool switch read number-of-positions 1 1 + + Verify TH receives NumberOfPositions attribute response on the TH(all-clusters-minimal-app) Log: + + [1666944027.604420][12769:12769] CHIP:DMG: ReportDataMessage = + [1666944027.604423][12769:12769] CHIP:DMG: { + [1666944027.604425][12769:12769] CHIP:DMG: AttributeReportIBs = + [1666944027.604430][12769:12769] CHIP:DMG: [ + [1666944027.604432][12769:12769] CHIP:DMG: AttributeReportIB = + [1666944027.604437][12769:12769] CHIP:DMG: { + [1666944027.604439][12769:12769] CHIP:DMG: AttributeDataIB = + [1666944027.604443][12769:12769] CHIP:DMG: { + [1666944027.604445][12769:12769] CHIP:DMG: DataVersion = 0x8c421c49, + [1666944027.604447][12769:12769] CHIP:DMG: AttributePathIB = + [1666944027.604450][12769:12769] CHIP:DMG: { + [1666944027.604452][12769:12769] CHIP:DMG: Endpoint = 0x1, + [1666944027.604455][12769:12769] CHIP:DMG: Cluster = 0x3b, + [1666944027.604459][12769:12769] CHIP:DMG: Attribute = 0x0000_0000, + [1666944027.604461][12769:12769] CHIP:DMG: } + [1666944027.604463][12769:12769] CHIP:DMG: + [1666944027.604466][12769:12769] CHIP:DMG: Data = 2, + [1666944027.604469][12769:12769] CHIP:DMG: }, + [1666944027.604480][12769:12769] CHIP:DMG: + [1666944027.604482][12769:12769] CHIP:DMG: }, + [1666944027.604486][12769:12769] CHIP:DMG: + [1666944027.604488][12769:12769] CHIP:DMG: ], + [1666944027.604492][12769:12769] CHIP:DMG: + [1666944027.604495][12769:12769] CHIP:DMG: SuppressResponse = true, + [1666944027.604497][12769:12769] CHIP:DMG: InteractionModelRevision = 1 + [1666944027.604500][12769:12769] CHIP:DMG: } + + + ./chip-tool switch read current-position 1 1 + + Verify TH receives CurrentPosition attribute response on the TH(all-clusters-minimal-app) Log: + + [1666944049.906683][12769:12769] CHIP:DMG: ReportDataMessage = + [1666944049.906685][12769:12769] CHIP:DMG: { + [1666944049.906687][12769:12769] CHIP:DMG: AttributeReportIBs = + [1666944049.906690][12769:12769] CHIP:DMG: [ + [1666944049.906692][12769:12769] CHIP:DMG: AttributeReportIB = + [1666944049.906695][12769:12769] CHIP:DMG: { + [1666944049.906697][12769:12769] CHIP:DMG: AttributeDataIB = + [1666944049.906699][12769:12769] CHIP:DMG: { + [1666944049.906701][12769:12769] CHIP:DMG: DataVersion = 0x8c421c49, + [1666944049.906703][12769:12769] CHIP:DMG: AttributePathIB = + [1666944049.906705][12769:12769] CHIP:DMG: { + [1666944049.906708][12769:12769] CHIP:DMG: Endpoint = 0x1, + [1666944049.906710][12769:12769] CHIP:DMG: Cluster = 0x3b, + [1666944049.906712][12769:12769] CHIP:DMG: Attribute = 0x0000_0001, + [1666944049.906714][12769:12769] CHIP:DMG: } + [1666944049.906717][12769:12769] CHIP:DMG: + [1666944049.906719][12769:12769] CHIP:DMG: Data = 0, + [1666944049.906721][12769:12769] CHIP:DMG: }, + [1666944049.906724][12769:12769] CHIP:DMG: + [1666944049.906726][12769:12769] CHIP:DMG: }, + [1666944049.906728][12769:12769] CHIP:DMG: + [1666944049.906730][12769:12769] CHIP:DMG: ], + [1666944049.906733][12769:12769] CHIP:DMG: + [1666944049.906735][12769:12769] CHIP:DMG: SuppressResponse = true, + [1666944049.906737][12769:12769] CHIP:DMG: InteractionModelRevision = 1 + [1666944049.906739][12769:12769] CHIP:DMG: } + disabled: true + + - label: + "DUT reads all supported optional attributes from TH one at a time in + a manufacturer specific order." + PICS: SWTCH.C.AO-READ + verification: | + TH all-clusters-minimal-app does not support optional attributes + + + ./chip-tool switch read multi-press-max 1 1 + + status = 0x86 (UNSUPPORTED_ATTRIBUTE), + disabled: true + + - label: + "DUT writes a suitable value to all supported optional attributes on + the TH one at a time in a manufacturer specific order." + PICS: SWTCH.C.AO-WRITE + verification: | + This cluster doesn"t have any writable attributes + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_SWTCH_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_SWTCH_3_1_Simulated.yaml deleted file mode 100644 index b3fce3158a4d2a..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_SWTCH_3_1_Simulated.yaml +++ /dev/null @@ -1,347 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: 74.3.1. [TC-SWTCH-3.1] Global attributes with client as DUT - -PICS: - - SWTCH.C - - SWTCH.C.AM-READ - - SWTCH.C.AO-READ - - SWTCH.C.AM-WRITE - - SWTCH.C.AO-WRITE - -config: - nodeId: 0x12344321 - cluster: "Switch" - endpoint: 0 - -tests: - #- label: "Wait for the device to be commissioned" - # cluster: "DelayCommands" - # command: "WaitForCommissioning" - - - label: "Read NumberOfPositions attribute" - wait: "readAttribute" - attribute: "NumberOfPositions" - - - label: "Read CurrentPosition attribute" - wait: "readAttribute" - attribute: "CurrentPosition" - - - label: "Read MultiPressMax attribute" - wait: "readAttribute" - attribute: "MultiPressMax" - - - label: - "Configure TH such that it implements mandatory and none of the - optional attributes of the server-side of the cluster, and that it - also reflects this in global attributes such as FeatureMap and - AttributeList. Commission DUT to TH again." - verification: | - ./chip-tool switch read feature-map 1 1 - - Verify TH receives FeatureMap attribute response on the TH(all-clusters-minimal-app) Log: - [1666943977.583820][12769:12769] CHIP:DMG: - [1666943977.583832][12769:12769] CHIP:DMG: ReportDataMessage = - [1666943977.583834][12769:12769] CHIP:DMG: { - [1666943977.583837][12769:12769] CHIP:DMG: AttributeReportIBs = - [1666943977.583842][12769:12769] CHIP:DMG: [ - [1666943977.583844][12769:12769] CHIP:DMG: AttributeReportIB = - [1666943977.583855][12769:12769] CHIP:DMG: { - [1666943977.583857][12769:12769] CHIP:DMG: AttributeDataIB = - [1666943977.583860][12769:12769] CHIP:DMG: { - [1666943977.583864][12769:12769] CHIP:DMG: DataVersion = 0x8c421c49, - [1666943977.583867][12769:12769] CHIP:DMG: AttributePathIB = - [1666943977.583870][12769:12769] CHIP:DMG: { - [1666943977.583873][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666943977.583877][12769:12769] CHIP:DMG: Cluster = 0x3b, - [1666943977.583880][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFC, - [1666943977.583883][12769:12769] CHIP:DMG: } - [1666943977.583887][12769:12769] CHIP:DMG: - [1666943977.583891][12769:12769] CHIP:DMG: Data = 1, - [1666943977.583893][12769:12769] CHIP:DMG: }, - [1666943977.583897][12769:12769] CHIP:DMG: - [1666943977.583899][12769:12769] CHIP:DMG: }, - [1666943977.583903][12769:12769] CHIP:DMG: - [1666943977.583905][12769:12769] CHIP:DMG: ], - [1666943977.583909][12769:12769] CHIP:DMG: - [1666943977.583911][12769:12769] CHIP:DMG: SuppressResponse = true, - [1666943977.583913][12769:12769] CHIP:DMG: InteractionModelRevision = 1 - - ./chip-tool switch read attribute-list 1 1 - - Verify TH receives AttributeList attribute response on the TH(all-clusters-minimal-app) Log: - - [1666944005.886938][12769:12769] CHIP:DMG: - [1666944005.886967][12769:12769] CHIP:DMG: ReportDataMessage = - [1666944005.886969][12769:12769] CHIP:DMG: { - [1666944005.886971][12769:12769] CHIP:DMG: AttributeReportIBs = - [1666944005.886974][12769:12769] CHIP:DMG: [ - [1666944005.886976][12769:12769] CHIP:DMG: AttributeReportIB = - [1666944005.886981][12769:12769] CHIP:DMG: { - [1666944005.886983][12769:12769] CHIP:DMG: AttributeDataIB = - [1666944005.886985][12769:12769] CHIP:DMG: { - [1666944005.886988][12769:12769] CHIP:DMG: DataVersion = 0x8c421c49, - [1666944005.886990][12769:12769] CHIP:DMG: AttributePathIB = - [1666944005.886992][12769:12769] CHIP:DMG: { - [1666944005.886995][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666944005.886997][12769:12769] CHIP:DMG: Cluster = 0x3b, - [1666944005.886999][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666944005.887001][12769:12769] CHIP:DMG: } - [1666944005.887006][12769:12769] CHIP:DMG: - [1666944005.887008][12769:12769] CHIP:DMG: Data = [ - [1666944005.887011][12769:12769] CHIP:DMG: - [1666944005.887014][12769:12769] CHIP:DMG: ], - [1666944005.887016][12769:12769] CHIP:DMG: }, - [1666944005.887020][12769:12769] CHIP:DMG: - [1666944005.887022][12769:12769] CHIP:DMG: }, - [1666944005.887027][12769:12769] CHIP:DMG: - [1666944005.887028][12769:12769] CHIP:DMG: AttributeReportIB = - [1666944005.887032][12769:12769] CHIP:DMG: { - [1666944005.887034][12769:12769] CHIP:DMG: AttributeDataIB = - [1666944005.887038][12769:12769] CHIP:DMG: { - [1666944005.887040][12769:12769] CHIP:DMG: DataVersion = 0x8c421c49, - [1666944005.887042][12769:12769] CHIP:DMG: AttributePathIB = - [1666944005.887044][12769:12769] CHIP:DMG: { - [1666944005.887047][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666944005.887049][12769:12769] CHIP:DMG: Cluster = 0x3b, - [1666944005.887052][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666944005.887054][12769:12769] CHIP:DMG: ListIndex = Null, - [1666944005.887056][12769:12769] CHIP:DMG: } - [1666944005.887059][12769:12769] CHIP:DMG: - [1666944005.887062][12769:12769] CHIP:DMG: Data = 0, - [1666944005.887064][12769:12769] CHIP:DMG: }, - [1666944005.887067][12769:12769] CHIP:DMG: - [1666944005.887069][12769:12769] CHIP:DMG: }, - [1666944005.887073][12769:12769] CHIP:DMG: - [1666944005.887075][12769:12769] CHIP:DMG: AttributeReportIB = - [1666944005.887079][12769:12769] CHIP:DMG: { - [1666944005.887081][12769:12769] CHIP:DMG: AttributeDataIB = - [1666944005.887084][12769:12769] CHIP:DMG: { - [1666944005.887086][12769:12769] CHIP:DMG: DataVersion = 0x8c421c49, - [1666944005.887088][12769:12769] CHIP:DMG: AttributePathIB = - [1666944005.887090][12769:12769] CHIP:DMG: { - [1666944005.887093][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666944005.887095][12769:12769] CHIP:DMG: Cluster = 0x3b, - [1666944005.887097][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666944005.887099][12769:12769] CHIP:DMG: ListIndex = Null, - [1666944005.887102][12769:12769] CHIP:DMG: } - [1666944005.887104][12769:12769] CHIP:DMG: - [1666944005.887107][12769:12769] CHIP:DMG: Data = 1, - [1666944005.887109][12769:12769] CHIP:DMG: }, - [1666944005.887112][12769:12769] CHIP:DMG: - [1666944005.887114][12769:12769] CHIP:DMG: }, - [1666944005.887118][12769:12769] CHIP:DMG: - [1666944005.887120][12769:12769] CHIP:DMG: AttributeReportIB = - [1666944005.887124][12769:12769] CHIP:DMG: { - [1666944005.887126][12769:12769] CHIP:DMG: AttributeDataIB = - [1666944005.887129][12769:12769] CHIP:DMG: { - [1666944005.887132][12769:12769] CHIP:DMG: DataVersion = 0x8c421c49, - [1666944005.887134][12769:12769] CHIP:DMG: AttributePathIB = - [1666944005.887136][12769:12769] CHIP:DMG: { - [1666944005.887138][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666944005.887141][12769:12769] CHIP:DMG: Cluster = 0x3b, - [1666944005.887143][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666944005.887145][12769:12769] CHIP:DMG: ListIndex = Null, - [1666944005.887147][12769:12769] CHIP:DMG: } - [1666944005.887150][12769:12769] CHIP:DMG: - [1666944005.887153][12769:12769] CHIP:DMG: Data = 65528, - [1666944005.887155][12769:12769] CHIP:DMG: }, - [1666944005.887159][12769:12769] CHIP:DMG: - [1666944005.887161][12769:12769] CHIP:DMG: }, - [1666944005.887166][12769:12769] CHIP:DMG: - [1666944005.887168][12769:12769] CHIP:DMG: AttributeReportIB = - [1666944005.887172][12769:12769] CHIP:DMG: { - [1666944005.887174][12769:12769] CHIP:DMG: AttributeDataIB = - [1666944005.887176][12769:12769] CHIP:DMG: { - [1666944005.887179][12769:12769] CHIP:DMG: DataVersion = 0x8c421c49, - [1666944005.887181][12769:12769] CHIP:DMG: AttributePathIB = - [1666944005.887183][12769:12769] CHIP:DMG: { - [1666944005.887185][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666944005.887190][12769:12769] CHIP:DMG: Cluster = 0x3b, - [1666944005.887192][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666944005.887194][12769:12769] CHIP:DMG: ListIndex = Null, - [1666944005.887196][12769:12769] CHIP:DMG: } - [1666944005.887200][12769:12769] CHIP:DMG: - [1666944005.887202][12769:12769] CHIP:DMG: Data = 65529, - [1666944005.887204][12769:12769] CHIP:DMG: }, - [1666944005.887207][12769:12769] CHIP:DMG: - [1666944005.887209][12769:12769] CHIP:DMG: }, - [1666944005.887213][12769:12769] CHIP:DMG: - [1666944005.887215][12769:12769] CHIP:DMG: AttributeReportIB = - [1666944005.887220][12769:12769] CHIP:DMG: { - [1666944005.887221][12769:12769] CHIP:DMG: AttributeDataIB = - [1666944005.887224][12769:12769] CHIP:DMG: { - [1666944005.887227][12769:12769] CHIP:DMG: DataVersion = 0x8c421c49, - [1666944005.887229][12769:12769] CHIP:DMG: AttributePathIB = - [1666944005.887231][12769:12769] CHIP:DMG: { - [1666944005.887234][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666944005.887237][12769:12769] CHIP:DMG: Cluster = 0x3b, - [1666944005.887239][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666944005.887242][12769:12769] CHIP:DMG: ListIndex = Null, - [1666944005.887244][12769:12769] CHIP:DMG: } - [1666944005.887246][12769:12769] CHIP:DMG: - [1666944005.887249][12769:12769] CHIP:DMG: Data = 65531, - [1666944005.887251][12769:12769] CHIP:DMG: }, - [1666944005.887254][12769:12769] CHIP:DMG: - [1666944005.887256][12769:12769] CHIP:DMG: }, - [1666944005.887261][12769:12769] CHIP:DMG: - [1666944005.887263][12769:12769] CHIP:DMG: AttributeReportIB = - [1666944005.887266][12769:12769] CHIP:DMG: { - [1666944005.887268][12769:12769] CHIP:DMG: AttributeDataIB = - [1666944005.887271][12769:12769] CHIP:DMG: { - [1666944005.887274][12769:12769] CHIP:DMG: DataVersion = 0x8c421c49, - [1666944005.887276][12769:12769] CHIP:DMG: AttributePathIB = - [1666944005.887278][12769:12769] CHIP:DMG: { - [1666944005.887280][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666944005.887283][12769:12769] CHIP:DMG: Cluster = 0x3b, - [1666944005.887285][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666944005.887287][12769:12769] CHIP:DMG: ListIndex = Null, - [1666944005.887289][12769:12769] CHIP:DMG: } - [1666944005.887292][12769:12769] CHIP:DMG: - [1666944005.887294][12769:12769] CHIP:DMG: Data = 65532, - [1666944005.887297][12769:12769] CHIP:DMG: }, - [1666944005.887299][12769:12769] CHIP:DMG: - [1666944005.887301][12769:12769] CHIP:DMG: }, - [1666944005.887306][12769:12769] CHIP:DMG: - [1666944005.887308][12769:12769] CHIP:DMG: AttributeReportIB = - [1666944005.887311][12769:12769] CHIP:DMG: { - [1666944005.887313][12769:12769] CHIP:DMG: AttributeDataIB = - [1666944005.887316][12769:12769] CHIP:DMG: { - [1666944005.887318][12769:12769] CHIP:DMG: DataVersion = 0x8c421c49, - [1666944005.887320][12769:12769] CHIP:DMG: AttributePathIB = - [1666944005.887323][12769:12769] CHIP:DMG: { - [1666944005.887325][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666944005.887327][12769:12769] CHIP:DMG: Cluster = 0x3b, - [1666944005.887330][12769:12769] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666944005.887332][12769:12769] CHIP:DMG: ListIndex = Null, - [1666944005.887334][12769:12769] CHIP:DMG: } - [1666944005.887337][12769:12769] CHIP:DMG: - [1666944005.887340][12769:12769] CHIP:DMG: Data = 65533, - [1666944005.887342][12769:12769] CHIP:DMG: }, - [1666944005.887345][12769:12769] CHIP:DMG: - [1666944005.887347][12769:12769] CHIP:DMG: }, - [1666944005.887350][12769:12769] CHIP:DMG: - [1666944005.887351][12769:12769] CHIP:DMG: ], - [1666944005.887361][12769:12769] CHIP:DMG: - [1666944005.887363][12769:12769] CHIP:DMG: SuppressResponse = true, - [1666944005.887365][12769:12769] CHIP:DMG: InteractionModelRevision = 1 - [1666944005.887367][12769:12769] CHIP:DMG: } - - - - - ./chip-tool switch read number-of-positions 1 1 - - Verify TH receives NumberOfPositions attribute response on the TH(all-clusters-minimal-app) Log: - [1666944027.604420][12769:12769] CHIP:DMG: ReportDataMessage = - [1666944027.604423][12769:12769] CHIP:DMG: { - [1666944027.604425][12769:12769] CHIP:DMG: AttributeReportIBs = - [1666944027.604430][12769:12769] CHIP:DMG: [ - [1666944027.604432][12769:12769] CHIP:DMG: AttributeReportIB = - [1666944027.604437][12769:12769] CHIP:DMG: { - [1666944027.604439][12769:12769] CHIP:DMG: AttributeDataIB = - [1666944027.604443][12769:12769] CHIP:DMG: { - [1666944027.604445][12769:12769] CHIP:DMG: DataVersion = 0x8c421c49, - [1666944027.604447][12769:12769] CHIP:DMG: AttributePathIB = - [1666944027.604450][12769:12769] CHIP:DMG: { - [1666944027.604452][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666944027.604455][12769:12769] CHIP:DMG: Cluster = 0x3b, - [1666944027.604459][12769:12769] CHIP:DMG: Attribute = 0x0000_0000, - [1666944027.604461][12769:12769] CHIP:DMG: } - [1666944027.604463][12769:12769] CHIP:DMG: - [1666944027.604466][12769:12769] CHIP:DMG: Data = 2, - [1666944027.604469][12769:12769] CHIP:DMG: }, - [1666944027.604480][12769:12769] CHIP:DMG: - [1666944027.604482][12769:12769] CHIP:DMG: }, - [1666944027.604486][12769:12769] CHIP:DMG: - [1666944027.604488][12769:12769] CHIP:DMG: ], - [1666944027.604492][12769:12769] CHIP:DMG: - [1666944027.604495][12769:12769] CHIP:DMG: SuppressResponse = true, - [1666944027.604497][12769:12769] CHIP:DMG: InteractionModelRevision = 1 - [1666944027.604500][12769:12769] CHIP:DMG: } - - - ./chip-tool switch read current-position 1 1 - - Verify TH receives CurrentPosition attribute response on the TH(all-clusters-minimal-app) Log: - [1666944049.906683][12769:12769] CHIP:DMG: ReportDataMessage = - [1666944049.906685][12769:12769] CHIP:DMG: { - [1666944049.906687][12769:12769] CHIP:DMG: AttributeReportIBs = - [1666944049.906690][12769:12769] CHIP:DMG: [ - [1666944049.906692][12769:12769] CHIP:DMG: AttributeReportIB = - [1666944049.906695][12769:12769] CHIP:DMG: { - [1666944049.906697][12769:12769] CHIP:DMG: AttributeDataIB = - [1666944049.906699][12769:12769] CHIP:DMG: { - [1666944049.906701][12769:12769] CHIP:DMG: DataVersion = 0x8c421c49, - [1666944049.906703][12769:12769] CHIP:DMG: AttributePathIB = - [1666944049.906705][12769:12769] CHIP:DMG: { - [1666944049.906708][12769:12769] CHIP:DMG: Endpoint = 0x1, - [1666944049.906710][12769:12769] CHIP:DMG: Cluster = 0x3b, - [1666944049.906712][12769:12769] CHIP:DMG: Attribute = 0x0000_0001, - [1666944049.906714][12769:12769] CHIP:DMG: } - [1666944049.906717][12769:12769] CHIP:DMG: - [1666944049.906719][12769:12769] CHIP:DMG: Data = 0, - [1666944049.906721][12769:12769] CHIP:DMG: }, - [1666944049.906724][12769:12769] CHIP:DMG: - [1666944049.906726][12769:12769] CHIP:DMG: }, - [1666944049.906728][12769:12769] CHIP:DMG: - [1666944049.906730][12769:12769] CHIP:DMG: ], - [1666944049.906733][12769:12769] CHIP:DMG: - [1666944049.906735][12769:12769] CHIP:DMG: SuppressResponse = true, - [1666944049.906737][12769:12769] CHIP:DMG: InteractionModelRevision = 1 - [1666944049.906739][12769:12769] 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: - "DUT reads all supported optional attributes from TH one at a time in - a manufacturer specific order" - verification: | - TH all-clusters-minimal-app does not support optional attributes - - ./chip-tool switch read multi-press-max 1 1 - - status = 0x86 (UNSUPPORTED_ATTRIBUTE), - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "DUT writes a suitable value to all supported optional attributes on - the TH one at a time in a manufacturer specific order" - verification: | - This cluster doesn't have any writable attributes - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_SWTCH_3_2.yaml b/src/app/tests/suites/certification/Test_TC_SWTCH_3_2.yaml index d81bb36675b768..120f23f3de3787 100644 --- a/src/app/tests/suites/certification/Test_TC_SWTCH_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_SWTCH_3_2.yaml @@ -117,9 +117,8 @@ tests: verification: | ./chip-tool switch read feature-map 1 1 - verify on Reference app receives the right response for the data sent in the above commands - Verify FeatureMap value as 1 in TH all-clusters-app log + Verify FeatureMap value is 1 in TH all-clusters-app log ReportDataMessage = [1671450600.457719][8426:8426] CHIP:DMG: { @@ -154,7 +153,7 @@ tests: verification: | ./chip-tool switch read number-of-positions 1 1 - Verify number of positions value as 2 in TH all-clusters-app log + Verify number of positions value is 2 in TH all-clusters-app log ReportDataMessage = [1671450651.817816][8426:8426] CHIP:DMG: { @@ -189,7 +188,7 @@ tests: the switch is operated." PICS: SWTCH.C.F00 && SWTCH.C.M.EV verification: | - On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) + On Raspi platform to trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor DUT should have capability to generate this event) echo '{"Name":"SwitchLatched","NewPosition":0}' > /tmp/chip_all_clusters_fifo_ (PID of DUT) @@ -203,8 +202,7 @@ tests: 1. ./chip-tool interactive start 2. switch subscribe-event switch-latched 1 100 1 1 - Verify switch latched event has newposition set to 0 on TH chip-tool logs: - + Verify switch latched event has newposition set to 0 on DUT (chip-tool) logs: [1659679766.774013][2535:2540] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0000 [1659679766.774035][2535:2540] CHIP:TOO: Event number: 3 [1659679766.774055][2535:2540] CHIP:TOO: Priority: Info @@ -220,7 +218,7 @@ tests: minute period) DUT reads attribute CurrentPosition regularly," PICS: SWTCH.C.F00 && SWTCH.C.M.RA verification: | - On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) + On Raspi platform to trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor DUT should have capability to generate this event) echo '{"Name":"SwitchLatched","NewPosition":1}' > /tmp/chip_all_clusters_fifo_ (PID of DUT) @@ -241,7 +239,7 @@ tests: 1. ./chip-tool interactive start 2. switch read current-position 1 1 (in practice, DUT will issue this command, TH answers) - Verify switch latched event has newposition set to 1 on TH chip-tool logs: + Verify switch latched event has newposition set to 1 on DUT (chip-tool) logs: [1659621181.542124][5668:5673] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_0001 DataVersion: 1273335636 [1659621181.542207][5668:5673] CHIP:TOO: current position: 1 @@ -256,7 +254,7 @@ tests: NewPosition reflecting the new state) on every change" PICS: SWTCH.C.F00 && SWTCH.C.M.EV verification: | - On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) + On Raspi platform to trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor DUT should have capability to generate this event) echo "{"Name":"SwitchLatched","NewPosition":1}" > /tmp/chip_all_clusters_fifo_ (PID of DUT) @@ -276,7 +274,8 @@ tests: 2. switch subscribe-event switch-latched 1 100 1 1 all-clusters app will emit events to the subscriber (DUT-client), e.g. - Verify in TH(chip-tool) Log: + Verify Position is changing for 0 to 1 on DUT(chip-tool) Log: + [1659680091.149404][2592:2597] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0000 [1659680091.149428][2592:2597] CHIP:TOO: Event number: 3 [1659680091.149449][2592:2597] CHIP:TOO: Priority: Info @@ -346,7 +345,7 @@ tests: 2. switch read feature-map 1 1 - Verify FeatureMap value as 1 in TH all-clusters-app log + Verify FeatureMap value is 1 in TH all-clusters-app log ] CHIP:DMG: ReportDataMessage = [1671450600.457719][8426:8426] CHIP:DMG: { [1671450600.457728][8426:8426] CHIP:DMG: AttributeReportIBs = @@ -382,7 +381,7 @@ tests: 2. switch read number-of-positions 1 1 - Verify number of positions value as 2 in TH all-clusters-app log + Verify number of positions value is 2 in TH all-clusters-app log DMG: ReportDataMessage = [1671450651.817816][8426:8426] CHIP:DMG: { [1671450651.817819][8426:8426] CHIP:DMG: AttributeReportIBs = @@ -417,7 +416,7 @@ tests: switch is operated." PICS: SWTCH.C.F01 && SWTCH.C.M.EV verification: | - On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) + On Raspi platform to trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor DUT should have capability to generate this event) echo '{"Name":"InitialPress","NewPosition":0}' > /tmp/chip_all_clusters_fifo_ (PID of DUT) @@ -426,7 +425,7 @@ tests: [1659624126.647438][8590:8590] CHIP:-: The new position when the momentary switch starts to be pressed:1 [1659624126.647480][8590:8590] CHIP:ZCL: SwitchServer: OnInitialPress - Verify in TH Log, e.g. (one such message per event subscription being set up) + Verify for InitialPress event in DUT(chip-tool) Log, e.g. (one such message per event subscription being set up) Please use Interactive mode to Verify the subscription of an event Here the command to enter interactive mode:-- @@ -443,6 +442,8 @@ tests: echo '{"Name":"ShortRelease","PreviousPosition":0}' > /tmp/chip_all_clusters_fifo_ (PID of DUT) + Verify for ShortRelease event in DUT(chip-tool) Log: + [1659683678.805455][2530:2538] CHIP:-: Received payload: "{"Name":"ShortRelease","PreviousPosition":0}" [1659683678.805739][2530:2530] CHIP:DMG: Endpoint 1, Cluster 0x0000_003B update version to ee5e7715 [1659683678.805777][2530:2530] CHIP:-: The the previous value of the CurrentPosition when the momentary switch has been released:1 @@ -503,7 +504,7 @@ tests: to 0 - wait 10 seconds DUT reads attribute CurrentPosition regularly" PICS: SWTCH.C.F01 && SWTCH.C.M.RA verification: | - On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) + On Raspi platform to trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor DUT should have capability to generate this event) echo '{"Name":"InitialPress","NewPosition":1}' > /tmp/chip_all_clusters_fifo_ (PID of DUT) @@ -552,7 +553,7 @@ tests: the event ShortRelease (with field PreviousPosition=1) wait 10 seconds" PICS: SWTCH.C.F01 && SWTCH.C.M.EV verification: | - On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) + On Raspi platform to trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor DUT should have capability to generate this event) echo '{"Name":"InitialPress","NewPosition":1}' > /tmp/chip_all_clusters_fifo_ (PID of DUT) @@ -613,7 +614,7 @@ tests: LongRelease (with field PreviousPosition=1) wait 8 seconds" PICS: SWTCH.C.F01 && SWTCH.C.F03 && SWTCH.C.M.EV verification: | - On Raspi platform To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor Dut should have capability to generate this event) + On Raspi platform to trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor DUT should have capability to generate this event) echo '{"Name":"InitialPress","NewPosition":1}' > /tmp/chip_all_clusters_fifo_ (PID of DUT) diff --git a/src/app/tests/suites/certification/Test_TC_TSTAT_2_2.yaml b/src/app/tests/suites/certification/Test_TC_TSTAT_2_2.yaml index bef6709a1920ec..728066c92e498f 100644 --- a/src/app/tests/suites/certification/Test_TC_TSTAT_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSTAT_2_2.yaml @@ -192,6 +192,7 @@ tests: verification: | Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE. Below is the log of RPI the result may be vary on the basis of dut implementation. + #2 Test Harness Client attempts to write OccupiedCoolingSetpoint below the MinCoolSetpointLimit and confirms that the device does not accept the value. ./chip-tool thermostat write occupied-cooling-setpoint 1000 1 1 On TH(chip-tool) verify that DUT sends a CONSTRAINT_ERROR (0x87) for the value which is below of the MinCoolSetpointLimit @@ -271,7 +272,7 @@ tests: "Writes If TSTAT.S.F05(AUTO) LowerLimit = Max(MinCoolSetpointLimit, (OccupiedHeatingSetpoint + MinSetpointDeadBand)) to OccupiedCoolingSetpoint attribute when Auto is enabled" - PICS: TSTAT.S.F05 && TSTAT.S.A0012 && PICS_SKIP_SAMPLE_APP + PICS: TSTAT.S.F05 && TSTAT.S.A0011 && PICS_SKIP_SAMPLE_APP verification: | Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE. Below is the log of RPI the result may be vary on the basis of dut implementation. @@ -354,7 +355,9 @@ tests: verification: | Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE. Below is the log of RPI the result may be vary on the basis of dut implementation. - ./chip-tool thermostat write occupied-heating-setpoint 500 1 1 + #1. Test Harness Client attempts to write OccupiedHeatingSetpoint below the MinHeatSetpointLimit and confirms that the device does not accept the value + + ./chip-tool thermostat write occupied-heating-setpoint 500 1 1 On TH(chip-tool) verify that DUT sends a CONSTRAINT_ERROR (0x87) [1676029113.651245][19392:19394] CHIP:DMG: WriteClient moving to [AwaitingDe] [1676029113.651285][19392:19394] CHIP:TOO: Response Failure: IM Error 0x00000587: General error: 0x87 (CONSTRAINT_ERROR) @@ -428,11 +431,26 @@ tests: TSTAT.S.F05 && TSTAT.S.A0011 && TSTAT.S.A0012 && PICS_SKIP_SAMPLE_APP verification: | Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE. Below is the log of RPI the result may be vary on the basis of dut implementation. + + Test Harness Client then attempts to write OccupiedHeatingSetpoint to both of the limits of MinHeatSetpointLimit(700) & UpperLimit(3000) and confirms that the device does accept the value. + + ./chip-tool thermostat write occupied-heating-setpoint 3000 1 1 + + On TH(chip-tool) verify that DUT sends a success response + 1676029222.303920][19403:19405] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1676029222.303955][19403:19405] CHIP:TOO: Response Failure: IM Error 0x00000587: General error: 0x87 (CONSTRAINT_ERROR) + [1676029222.304055][19403:19405] CHIP:EM: <<< [E:236i M:251820549 (Ack:138263425)] (S) Msg TX to 1:0000000000000001 [E8D5] --- Type 0000:10 + ./chip-tool thermostat write occupied-heating-setpoint 3000 1 1 - On TH(chip-tool) verify that DUT sends a success response - 1676029222.303920][19403:19405] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1676029222.303955][19403:19405] CHIP:TOO: Response Failure: IM Error 0x00000587: General error: 0x87 (CONSTRAINT_ERROR) - [1676029222.304055][19403:19405] CHIP:EM: <<< [E:236i M:251820549 (Ack:138263425)] (S) Msg TX to 1:0000000000000001 [E8D5] --- Type 0000:10 + On TH(chip-tool) verify that DUT sends a success response + + + [1678943387.942204][770598:770600] CHIP:DMG: StatusIB = + [1678943387.942212][770598:770600] CHIP:DMG: { + [1678943387.942220][770598:770600] CHIP:DMG: status = 0x00 (SUCCESS), + [1678943387.942228][770598:770600] CHIP:DMG: }, + [1678943387.942236][770598:770600] CHIP:DMG: + [1678943387.942243][770598:770600] CHIP:DMG: }, cluster: "LogCommands" command: "UserPrompt" arguments: @@ -521,7 +539,9 @@ tests: verification: | Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE. Below is the log of RPI the result may be vary on the basis of dut implementation. - ./chip-tool thermostat write occupied-heating-setpoint 500 1 1 + #1. Test Harness Client attempts to write OccupiedHeatingSetpoint below the MinHeatSetpointLimit and confirms that the device does not accept the value + + ./chip-tool thermostat write unoccupied-cooling-setpoint 500 1 1 On TH(chip-tool) verify that DUT sends a CONSTRAINT_ERROR (0x87) [1676029263.842915][19409:19411] CHIP:DMG: WriteClient moving to [AwaitingDe] [1676029263.842943][19409:19411] CHIP:TOO: Response Failure: IM Error 0x00000587: General error: 0x87 (CONSTRAINT_ERROR) @@ -696,7 +716,9 @@ tests: verification: | Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE. Below is the log of RPI the result may be vary on the basis of dut implementation. - ./chip-tool thermostat write unoccupied-cooling-setpoint 500 1 1 + #1. Test Harness Client attempts to write UnoccupiedHeatingSetpoint below the MinHeatSetpointLimit and confirms that the device does not accept the value + + ./chip-tool thermostat write unoccupied-heating-setpoint 500 1 1 On TH(chip-tool) verify that DUT sends a CONSTRAINT_ERROR (0x87). As its an optional attribute, we are not getting expected result [1676029557.268065][19431:19433] CHIP:DMG: } @@ -883,6 +905,7 @@ tests: PICS: TSTAT.S.F00 && TSTAT.S.A0015 && TSTAT.S.A0003 && PICS_SKIP_SAMPLE_APP verification: | + #1. Test Harness Client attempts to write MinHeatSetpointLimit below the AbsMinHeatSetpointLimit and confirms that the device does not accept the value. ./chip-tool thermostat write min-heat-setpoint-limit 300 1 1 On TH (chip-tool) verify that DUT sends a CONSTRAINT_ERROR (0x87) [1676029705.839179][19450:19452] CHIP:DMG: } @@ -948,20 +971,20 @@ tests: TSTAT.S.F00 && TSTAT.S.A0015 && TSTAT.S.F05 && TSTAT.S.A0005 && PICS_SKIP_SAMPLE_APP verification: | - ./chip-tool thermostat write min-heat-setpoint-limit 1000 1 1 + Test Harness Client then attempts to write MinHeatSetpointLimit to both of the limits of AbsMinHeatSetpointLimit & UpperLimit and confirms that the device does accept the value. + below is an exaple command. + + ./chip-tool thermostat write min-heat-setpoint-limit 1200 1 1 On TH(chip-tool) verify that DUT sends a success response - [1658389641.734245][3279:3284] CHIP:DMG: Endpoint = 0x1, - [1658389641.734285][3279:3284] CHIP:DMG: Cluster = 0x201, - [1658389641.734326][3279:3284] CHIP:DMG: Attribute = 0x0000_0015, - [1658389641.734360][3279:3284] CHIP:DMG: } - [1658389641.734402][3279:3284] CHIP:DMG: - [1658389641.734438][3279:3284] CHIP:DMG: StatusIB = - [1658389641.734475][3279:3284] CHIP:DMG: { - [1658389641.734512][3279:3284] CHIP:DMG: status = 0x00 (SUCCESS), - [1658389641.734549][3279:3284] CHIP:DMG: }, - [1658389641.734586][3279:3284] CHIP:DMG: - [1658389641.734617][3279:3284] CHIP:DMG: }, + + [1676029742.329801][19458:19460] CHIP:DMG: } + [1676029742.329846][19458:19460] CHIP:DMG: + [1676029742.329883][19458:19460] CHIP:DMG: StatusIB = + [1676029742.329922][19458:19460] CHIP:DMG: { + [1676029742.329962][19458:19460] CHIP:DMG: status = 0x00 (SUCCESS), + [1676029742.330001][19458:19460] CHIP:DMG: }, + [1676029742.330040][19458:19460] CHIP:DMG: cluster: "LogCommands" command: "UserPrompt" arguments: @@ -1076,6 +1099,7 @@ tests: verification: | Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE. Below is the log of RPI the result may be vary on the basis of dut implementation. + #1. Test Harness Client attempts to write MaxHeatSetpointLimit below the MinHeatSetpointLimit and confirms that the device does not accept the value. ./chip-tool thermostat write max-heat-setpoint-limit 100 1 1 On TH(chip-tool) verify that DUT sends a CONSTRAINT_ERROR (0x87) [1676029976.380552][19475:19477] CHIP:DMG: WriteClient moving to [AwaitingDe] @@ -1139,21 +1163,25 @@ tests: TSTAT.S.F00 && TSTAT.S.A0016 && TSTAT.S.F05 && TSTAT.S.A0018 && PICS_SKIP_SAMPLE_APP verification: | - ./chip-tool thermostat write max-heat-setpoint-limit 2000(Consider the different value but valid4) 1 1 + Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE. Below is the log of RPI the result may be vary on the basis of dut implementation + + Test Harness Client then attempts to write MaxHeatSetpointLimit to both of the limits of MinHeatSetpointLimit & UpperLimit and confirms that the device does accept the value. + + below is an examble command + + ./chip-tool thermostat write max-heat-setpoint-limit 2000( Consider the different value but valid4) 1 1 On TH(chip-tool) verify that DUT sends a success response - [1658389911.809423][3333:3338] CHIP:DMG: Endpoint = 0x1, - [1658389911.809492][3333:3338] CHIP:DMG: Cluster = 0x201, - [1658389911.809562][3333:3338] CHIP:DMG: Attribute = 0x0000_0016, - [1658389911.809627][3333:3338] CHIP:DMG: } - [1658389911.809698][3333:3338] CHIP:DMG: - [1658389911.809761][3333:3338] CHIP:DMG: StatusIB = - [1658389911.809827][3333:3338] CHIP:DMG: { - [1658389911.809892][3333:3338] CHIP:DMG: status = 0x00 (SUCCESS), - [1658389911.809957][3333:3338] CHIP:DMG: }, - [1658389911.809994][3333:3338] CHIP:DMG: - [1658389911.810021][3333:3338] CHIP:DMG: }, - [1658389911.810051][3333:3338] CHIP:DMG: - [1658389911.810076][3333:3338] CHIP:DMG: ], + + [1676030018.852009][19481:19483] CHIP:DMG: Cluster = 0x201, + [1676030018.852054][19481:19483] CHIP:DMG: Attribute = 0x0000_0016, + [1676030018.852094][19481:19483] CHIP:DMG: } + [1676030018.852138][19481:19483] CHIP:DMG: + [1676030018.852178][19481:19483] CHIP:DMG: StatusIB = + [1676030018.852218][19481:19483] CHIP:DMG: { + [1676030018.852258][19481:19483] CHIP:DMG: status = 0x00 (SUCCESS), + [1676030018.852297][19481:19483] CHIP:DMG: }, + [1676030018.852337][19481:19483] CHIP:DMG: + [1676030018.852370][19481:19483] CHIP:DMG: }, cluster: "LogCommands" command: "UserPrompt" arguments: @@ -1245,19 +1273,15 @@ tests: verification: | Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE. Below is the log of RPI the result may be vary on the basis of dut implementation. + #1. Test Harness Client then attempts to write MinCoolSetpointLimit below the AbsMinCoolSetpointLimit and confirms that the device does not accept the value. + + ./chip-tool thermostat write min-cool-setpoint-limit 400 1 1 - ./chip-tool thermostat write max-heat-setpoint-limit 90 1 1 On TH(chip-tool) verify that DUT sends a CONSTRAINT_ERROR (0x87) - [1658390040.444407][3343:3348] CHIP:DMG: - [1658390040.444443][3343:3348] CHIP:DMG: }, - [1658390040.444483][3343:3348] CHIP:DMG: - [1658390040.444515][3343:3348] CHIP:DMG: ], - [1658390040.444553][3343:3348] CHIP:DMG: - [1658390040.444585][3343:3348] CHIP:DMG: InteractionModelRevision = 1 - [1658390040.444616][3343:3348] CHIP:DMG: } - [1658390040.444703][3343:3348] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1658390040.444744][3343:3348] CHIP:TOO: Response Failure: IM Error 0x00000587: General error: 0x87 (CONSTRAINT_ERROR) - [1658390040.444843][3343:3348] CHIP:EM: Sending Standalone Ack for MessageCounter:137523063 on exchange 39419i + [1676030095.274876][19495:19497] CHIP:DMG: } + [1676030095.274936][19495:19497] CHIP:DMG: WriteClient moving to [AwaitingDe] + [1676030095.274965][19495:19497] CHIP:TOO: Response Failure: IM Error 0x00000587: General error: 0x87 (CONSTRAINT_ERROR) + [1676030095.275097][19495:19497] CHIP:EM: <<< [E:51146i M:60043723 (Ack:28649429)] (S) Msg TX to 1:0000000000000001 [E8D5] --- Type 0000:10 cluster: "LogCommands" command: "UserPrompt" arguments: @@ -1335,33 +1359,17 @@ tests: Test Harness Client then attempts to write MinCoolSetpointLimit to both of the limits of LowerLimit & MaxCoolSetpointLimit and confirms that the device does accept the value. - ./chip-tool thermostat write max-heat-setpoint-limit 2000 1 1 + ./chip-tool thermostat write min-cool-setpoint-limit 1600 1 1 + On TH(chip-tool) verify that DUT sends a success response - [1676030202.115210][19505:19507] CHIP:DMG: WriteResponseMessage = - [1676030202.115232][19505:19507] CHIP:DMG: { - [1676030202.115251][19505:19507] CHIP:DMG: AttributeStatusIBs = - [1676030202.115280][19505:19507] CHIP:DMG: [ - [1676030202.115301][19505:19507] CHIP:DMG: AttributeStatusIB = - [1676030202.115327][19505:19507] CHIP:DMG: { - [1676030202.115350][19505:19507] CHIP:DMG: AttributePathIB = - [1676030202.115379][19505:19507] CHIP:DMG: { - [1676030202.115408][19505:19507] CHIP:DMG: Endpoint = 0x1, - [1676030202.115437][19505:19507] CHIP:DMG: Cluster = 0x201, - [1676030202.115468][19505:19507] CHIP:DMG: Attribute = 0x0000_0016, - [1676030202.115497][19505:19507] CHIP:DMG: } - [1676030202.115529][19505:19507] CHIP:DMG: - [1676030202.115553][19505:19507] CHIP:DMG: StatusIB = - [1676030202.115583][19505:19507] CHIP:DMG: { - [1676030202.115610][19505:19507] CHIP:DMG: status = 0x00 (SUCCESS), - [1676030202.115637][19505:19507] CHIP:DMG: }, - [1676030202.115664][19505:19507] CHIP:DMG: - [1676030202.115687][19505:19507] CHIP:DMG: }, - [1676030202.115714][19505:19507] CHIP:DMG: - [1676030202.115735][19505:19507] CHIP:DMG: ], - [1676030202.115763][19505:19507] CHIP:DMG: - [1676030202.115784][19505:19507] CHIP:DMG: InteractionModelRevision = 1 - [1676030202.115805][19505:19507] CHIP:DMG: } - [1676030202.115869][19505:19507] CHIP:DMG: WriteClient moving to [AwaitingDe] + + [1678947233.814534][773656:773658] CHIP:DMG: + [1678947233.814541][773656:773658] CHIP:DMG: StatusIB = + [1678947233.814548][773656:773658] CHIP:DMG: { + [1678947233.814555][773656:773658] CHIP:DMG: status = 0x00 (SUCCESS), + [1678947233.814562][773656:773658] CHIP:DMG: }, + [1678947233.814570][773656:773658] CHIP:DMG: + [1678947233.814576][773656:773658] CHIP:DMG: }, cluster: "LogCommands" command: "UserPrompt" arguments: @@ -1435,7 +1443,10 @@ tests: verification: | Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE. Below is the log of RPI the result may be vary on the basis of dut implementation. + #1. Test Harness Client attempts to write MaxCoolSetpointLimit below the MinCoolSetpointLimit and confirms that the device does not accept the value. + ./chip-tool thermostat write max-cool-setpoint-limit 100 1 1 + On TH(chip-tool) verify that DUT sends a CONSTRAINT_ERROR (0x87) [1676030395.441963][19525:19527] CHIP:DMG: } [1676030395.442028][19525:19527] CHIP:DMG: WriteClient moving to [AwaitingDe] @@ -1528,11 +1539,20 @@ tests: verification: | Optional Attribute - If it is supported, then in TH log it will results in displaying the value, else it will display UNSUPPORTED_ATTRIBUTE. Below is the log of RPI the result may be vary on the basis of dut implementation. - ./chip-tool thermostat write max-cool-setpoint-limit 1900 1 1 + Test Harness Client then attempts to write MaxCoolSetpointLimit to both of the limits of LowerLimit & AbsMaxCoolSetpointLimit and confirms that the device does accept the value. + below is an example command + + ./chip-tool thermostat write max-cool-setpoint-limit 2000 1 1 + On TH verify that DUT sends a success response - [1676030512.074396][19536:19538] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1676030512.074446][19536:19538] CHIP:TOO: Response Failure: IM Error 0x00000587: General error: 0x87 (CONSTRAINT_ERROR) - [1676030512.074579][19536:19538] CHIP:EM: <<< [E:30570i M:59217688 (Ack:139377342)] (S) Msg TX to 1:0000000000000001 [E8D5] --- Type 0000:10 + + [1678947558.840324][773890:773892] CHIP:DMG: + [1678947558.840331][773890:773892] CHIP:DMG: StatusIB = + [1678947558.840339][773890:773892] CHIP:DMG: { + [1678947558.840347][773890:773892] CHIP:DMG: status = 0x00 (SUCCESS), + [1678947558.840354][773890:773892] CHIP:DMG: }, + [1678947558.840362][773890:773892] CHIP:DMG: + [1678947558.840369][773890:773892] CHIP:DMG: }, cluster: "LogCommands" command: "UserPrompt" arguments: diff --git a/src/app/tests/suites/certification/Test_TC_ULABEL_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_ULABEL_3_1_Simulated.yaml index 828d497d7f25ea..1419441fccb765 100644 --- a/src/app/tests/suites/certification/Test_TC_ULABEL_3_1_Simulated.yaml +++ b/src/app/tests/suites/certification/Test_TC_ULABEL_3_1_Simulated.yaml @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -name: 92.1. [TC-ULABEL-3.1] Global Attributes [DUT-server] +name: 95.3.1. [TC-ULABEL-3.1] User label cluster [DUT-client] PICS: - ULABEL.C diff --git a/src/app/tests/suites/certification/Test_TC_WAKEONLAN_4_1.yaml b/src/app/tests/suites/certification/Test_TC_WAKEONLAN_4_1.yaml index 357c617211c3fc..4e5244b7acec8f 100644 --- a/src/app/tests/suites/certification/Test_TC_WAKEONLAN_4_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_WAKEONLAN_4_1.yaml @@ -20,30 +20,62 @@ PICS: config: nodeId: 0x12344321 - cluster: "Wake on LAN" - endpoint: 1 + cluster: "Basic Information" + endpoint: 0 tests: - - label: "Wait for the commissioned device to be retrieved" - cluster: "DelayCommands" - command: "WaitForCommissionee" - arguments: - values: - - name: "nodeId" - value: nodeId - - label: "TH reads the MACAddress attribute from the DUT" PICS: WAKEONLAN.S.A0000 - command: "readAttribute" - attribute: "MACAddress" - response: - constraints: - minLength: 12 + 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 wakeonlan read macaddress 1 1 + ./chip-tv-casting-app wakeonlan read macaddress 1 1 + + On TH Verify that the response contains a 48-bit MAC Address. Record the MAC address. + [1654248817.394846][3637:3643] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0503 Attribute 0x0000_0000 DataVersion: 3900236652 + [1654248817.394895][3637:3643] CHIP:TOO: MACAddress: e4:5f:01:69:61:b1 + [1654248817.394982][3637:3643] CHIP:EM: Sending Standalone Ack for MessageCounter:15292555 on exchange 12123i + disabled: true - label: "TH sends a Sleep command to DUT" PICS: LOWPOWER.S.C00.Rsp - cluster: "Low Power" - command: "Sleep" + 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 lowpower sleep 1 1 + ./chip-tv-casting-app lowpower sleep 1 1 + + On TH verify the success response received from DUT + [1646101689.826629][3009:3014] CHIP:DMG: InvokeResponseMessage = + [1646101689.826665][3009:3014] CHIP:DMG: { + [1646101689.826697][3009:3014] CHIP:DMG: suppressResponse = false, + [1646101689.826727][3009:3014] CHIP:DMG: InvokeResponseIBs = + [1646101689.826769][3009:3014] CHIP:DMG: [ + [1646101689.826804][3009:3014] CHIP:DMG: InvokeResponseIB = + [1646101689.826848][3009:3014] CHIP:DMG: { + [1646101689.826882][3009:3014] CHIP:DMG: CommandStatusIB = + [1646101689.826922][3009:3014] CHIP:DMG: { + [1646101689.826954][3009:3014] CHIP:DMG: CommandPathIB = + [1646101689.826989][3009:3014] CHIP:DMG: { + [1646101689.827031][3009:3014] CHIP:DMG: EndpointId = 0x1, + [1646101689.827082][3009:3014] CHIP:DMG: ClusterId = 0x508, + [1646101689.827127][3009:3014] CHIP:DMG: CommandId = 0x0, + [1646101689.827172][3009:3014] CHIP:DMG: }, + [1646101689.827223][3009:3014] CHIP:DMG: + [1646101689.827260][3009:3014] CHIP:DMG: StatusIB = + [1646101689.827311][3009:3014] CHIP:DMG: { + [1646101689.827360][3009:3014] CHIP:DMG: status = 0x0, + [1646101689.827411][3009:3014] CHIP:DMG: }, + [1646101689.827457][3009:3014] CHIP:DMG: + [1646101689.827498][3009:3014] CHIP:DMG: }, + [1646101689.827540][3009:3014] CHIP:DMG: + [1646101689.827607][3009:3014] CHIP:DMG: }, + [1646101689.827658][3009:3014] CHIP:DMG: + [1646101689.827689][3009:3014] CHIP:DMG: ], + [1646101689.827730][3009:3014] CHIP:DMG: + [1646101689.827761][3009:3014] CHIP:DMG: InteractionModelRevision = 1 + [1646101689.827792][3009:3014] CHIP:DMG: }, + [1646101689.827875][3009:3014] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0508 Command=0x0000_0000 Status=0x0 + disabled: true - label: "TH sends a Wake-On LAN magic packet containing the MAC address from @@ -58,12 +90,4 @@ tests: [1654248854.491994][3652:3657] CHIP:TOO: AcceptedCommandList: 1 entries [1654248854.492040][3652:3657] CHIP:TOO: [1]: 0 [1654248854.492157][3652:3657] CHIP:EM: Sending Standalone Ack for MessageCounter:15063522 on exchange 51389i - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT - arguments: - values: - - name: "message" - value: "Please enter 'y' after success" - - name: "expectedValue" - value: "y" + disabled: true diff --git a/src/app/tests/suites/ciTests.json b/src/app/tests/suites/ciTests.json index 59c6fd83bc3755..dc88eb149ea72c 100644 --- a/src/app/tests/suites/ciTests.json +++ b/src/app/tests/suites/ciTests.json @@ -14,10 +14,7 @@ "AccessControlEnforcement": ["Test_TC_ACE_1_1", "Test_TC_ACE_1_5"], "BooleanState": ["Test_TC_BOOL_1_1", "Test_TC_BOOL_2_1"], "Binding": ["Test_TC_BIND_1_1"], - "BridgedDeviceBasicInformation": [ - "Test_TC_BRBINFO_1_1", - "Test_TC_BRBINFO_2_1" - ], + "BridgedDeviceBasicInformation": [], "Actions": ["Test_TC_ACT_1_1"], "ColorControl": [ "Test_TC_CC_1_1", @@ -105,7 +102,6 @@ "Test_TC_APBSC_1_10", "Test_TC_CONTENTLAUNCHER_1_11", "Test_TC_ALOGIN_1_12", - "Test_TC_ALOGIN_12_1", "Test_TC_LOWPOWER_2_1", "Test_TC_KEYPADINPUT_3_2", "Test_TC_KEYPADINPUT_3_3", @@ -118,7 +114,6 @@ "Test_TC_MEDIAINPUT_3_11", "Test_TC_MEDIAINPUT_3_12", "Test_TC_MEDIAINPUT_3_13", - "Test_TC_WAKEONLAN_4_1", "Test_TC_CHANNEL_5_1", "Test_TC_CHANNEL_5_2", "Test_TC_CHANNEL_5_3", diff --git a/src/app/tests/suites/manualTests.json b/src/app/tests/suites/manualTests.json index 4508ac137c6f99..1b34a8cd69930e 100644 --- a/src/app/tests/suites/manualTests.json +++ b/src/app/tests/suites/manualTests.json @@ -106,7 +106,7 @@ "Test_TC_DGGEN_2_3", "Test_TC_DGGEN_3_1" ], - "Identify": ["Test_TC_I_3_2"], + "Identify": ["Test_TC_I_3_1", "Test_TC_I_3_2"], "IlluminanceMeasurement": ["Test_TC_ILL_3_1"], "InteractionDataModel": [ "Test_TC_IDM_1_1", @@ -151,7 +151,9 @@ "Test_TC_CONTENTLAUNCHER_10_7", "Test_TC_MC_11_1", "Test_TC_MC_11_2", - "Test_TC_ALOGIN_12_2" + "Test_TC_ALOGIN_12_2", + "Test_TC_WAKEONLAN_4_1", + "Test_TC_ALOGIN_12_1" ], "MultipleFabrics": [ "Test_TC_CADMIN_1_1", @@ -206,7 +208,8 @@ "Test_TC_SU_4_1", "Test_TC_SU_4_2" ], - "PowerSourceConfiguration": ["Test_TC_PSCFG_2_2"], + "PowerSourceConfiguration": ["Test_TC_PSCFG_2_2", "Test_TC_PSCFG_3_1"], + "PressureMeasurement": ["Test_TC_PRS_3_1"], "SecureChannel": [ "Test_TC_SC_1_1", "Test_TC_SC_1_2", @@ -242,10 +245,10 @@ "EthernetNetworkDiagnostics": ["Test_TC_DGETH_3_2"], "WiFiNetworkDiagnostics": ["Test_TC_DGWIFI_2_2", "Test_TC_DGWIFI_3_2"], "WindowCovering": ["Test_TC_WNCV_6_1", "Test_TC_WNCV_7_1"], - "FlowMeasurement": ["Test_TC_FLW_2_2"], + "FlowMeasurement": ["Test_TC_FLW_2_2", "Test_TC_FLW_3_1"], "OccupancySensing": ["Test_TC_OCC_3_1"], - "PowerSource": ["Test_TC_PS_2_2"], - "BooleanState": ["Test_TC_BOOL_2_2"], + "PowerSource": ["Test_TC_PS_2_2", "Test_TC_PS_3_1"], + "BooleanState": ["Test_TC_BOOL_2_2", "Test_TC_BOOL_3_1"], "ColorControl": [ "Test_TC_CC_2_2", "Test_TC_CC_3_4", @@ -272,7 +275,7 @@ "LevelControl": ["Test_TC_LVL_2_3", "Test_TC_LVL_7_1", "Test_TC_LVL_8_1"], "OnOff": ["Test_TC_OO_2_3", "Test_TC_OO_3_1", "Test_TC_OO_3_2"], "RelativeHumidityMeasurement": ["Test_TC_RH_2_2"], - "Switch": ["Test_TC_SWTCH_2_2", "Test_TC_SWTCH_3_2"], + "Switch": ["Test_TC_SWTCH_2_2", "Test_TC_SWTCH_3_1", "Test_TC_SWTCH_3_2"], "TemperatureMeasurement": ["Test_TC_TMP_2_2", "Test_TC_TMP_3_1"], "Thermostat": ["Test_TC_TSTAT_3_1", "Test_TC_TSTAT_3_2"], "ThermostatUserConfiguration": ["Test_TC_TSUIC_3_1"], @@ -284,7 +287,12 @@ "Test_TC_DGTHREAD_3_4", "Test_TC_DGTHREAD_3_5" ], - "Actions": ["Test_TC_ACT_2_1", "Test_TC_ACT_2_2", "Test_TC_ACT_3_2"], + "Actions": [ + "Test_TC_ACT_2_1", + "Test_TC_ACT_2_2", + "Test_TC_ACT_3_1", + "Test_TC_ACT_3_2" + ], "TimeFormatLocalization": ["Test_TC_LTIME_2_1", "Test_TC_LTIME_3_1"], "UnitLocalization": [], "Binding": ["Test_TC_BIND_2_1", "Test_TC_BIND_2_2", "Test_TC_BIND_2_3"], @@ -299,6 +307,8 @@ "AccessControl": ["Test_TC_ACL_2_5", "Test_TC_ACL_2_6"], "UserLabel": [], "BridgedDeviceBasicInformation": [ + "Test_TC_BRBINFO_1_1", + "Test_TC_BRBINFO_2_1", "Test_TC_BRBINFO_2_2", "Test_TC_BRBINFO_2_3" ], @@ -323,6 +333,7 @@ "ModeSelect", "OTASoftwareUpdate", "PowerSourceConfiguration", + "PressureMeasurement", "SecureChannel", "SoftwareDiagnostics", "WiFiNetworkDiagnostics", diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index ea8348cb0a492e..7b7fbf2a205390 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -49,8 +49,6 @@ class TestList : public Command printf("Test_TC_ACE_1_5\n"); printf("Test_TC_BOOL_1_1\n"); printf("Test_TC_BOOL_2_1\n"); - printf("Test_TC_BRBINFO_1_1\n"); - printf("Test_TC_BRBINFO_2_1\n"); printf("Test_TC_ACT_1_1\n"); printf("Test_TC_BIND_1_1\n"); printf("Test_TC_CC_1_1\n"); @@ -119,7 +117,6 @@ class TestList : public Command printf("Test_TC_APBSC_1_10\n"); printf("Test_TC_CONTENTLAUNCHER_1_11\n"); printf("Test_TC_ALOGIN_1_12\n"); - printf("Test_TC_ALOGIN_12_1\n"); printf("Test_TC_LOWPOWER_2_1\n"); printf("Test_TC_KEYPADINPUT_3_2\n"); printf("Test_TC_KEYPADINPUT_3_3\n"); @@ -132,7 +129,6 @@ class TestList : public Command printf("Test_TC_MEDIAINPUT_3_11\n"); printf("Test_TC_MEDIAINPUT_3_12\n"); printf("Test_TC_MEDIAINPUT_3_13\n"); - printf("Test_TC_WAKEONLAN_4_1\n"); printf("Test_TC_CHANNEL_5_1\n"); printf("Test_TC_CHANNEL_5_2\n"); printf("Test_TC_CHANNEL_5_3\n"); @@ -379,6 +375,7 @@ class ManualTestList : public Command printf("Test_TC_DGGEN_2_2\n"); printf("Test_TC_DGGEN_2_3\n"); printf("Test_TC_DGGEN_3_1\n"); + printf("Test_TC_I_3_1\n"); printf("Test_TC_I_3_2\n"); printf("Test_TC_ILL_3_1\n"); printf("Test_TC_IDM_1_1\n"); @@ -422,6 +419,8 @@ class ManualTestList : public Command printf("Test_TC_MC_11_1\n"); printf("Test_TC_MC_11_2\n"); printf("Test_TC_ALOGIN_12_2\n"); + printf("Test_TC_WAKEONLAN_4_1\n"); + printf("Test_TC_ALOGIN_12_1\n"); printf("Test_TC_CADMIN_1_1\n"); printf("Test_TC_CADMIN_1_2\n"); printf("Test_TC_CADMIN_1_7\n"); @@ -470,6 +469,8 @@ class ManualTestList : public Command printf("Test_TC_SU_4_1\n"); printf("Test_TC_SU_4_2\n"); printf("Test_TC_PSCFG_2_2\n"); + printf("Test_TC_PSCFG_3_1\n"); + printf("Test_TC_PRS_3_1\n"); printf("Test_TC_SC_1_1\n"); printf("Test_TC_SC_1_2\n"); printf("Test_TC_SC_1_3\n"); @@ -503,9 +504,12 @@ class ManualTestList : public Command printf("Test_TC_WNCV_6_1\n"); printf("Test_TC_WNCV_7_1\n"); printf("Test_TC_FLW_2_2\n"); + printf("Test_TC_FLW_3_1\n"); printf("Test_TC_OCC_3_1\n"); printf("Test_TC_PS_2_2\n"); + printf("Test_TC_PS_3_1\n"); printf("Test_TC_BOOL_2_2\n"); + printf("Test_TC_BOOL_3_1\n"); printf("Test_TC_CC_2_2\n"); printf("Test_TC_CC_3_4\n"); printf("Test_TC_CC_4_5\n"); @@ -533,6 +537,7 @@ class ManualTestList : public Command printf("Test_TC_OO_3_2\n"); printf("Test_TC_RH_2_2\n"); printf("Test_TC_SWTCH_2_2\n"); + printf("Test_TC_SWTCH_3_1\n"); printf("Test_TC_SWTCH_3_2\n"); printf("Test_TC_TMP_2_2\n"); printf("Test_TC_TMP_3_1\n"); @@ -547,6 +552,7 @@ class ManualTestList : public Command printf("Test_TC_DGTHREAD_3_5\n"); printf("Test_TC_ACT_2_1\n"); printf("Test_TC_ACT_2_2\n"); + printf("Test_TC_ACT_3_1\n"); printf("Test_TC_ACT_3_2\n"); printf("Test_TC_LTIME_2_1\n"); printf("Test_TC_LTIME_3_1\n"); @@ -561,6 +567,8 @@ class ManualTestList : public Command printf("Test_TC_PCC_3_1\n"); printf("Test_TC_ACL_2_5\n"); printf("Test_TC_ACL_2_6\n"); + printf("Test_TC_BRBINFO_1_1\n"); + printf("Test_TC_BRBINFO_2_1\n"); printf("Test_TC_BRBINFO_2_2\n"); printf("Test_TC_BRBINFO_2_3\n"); printf("Test_TC_ACE_1_2\n"); @@ -5596,7 +5604,7 @@ class Test_TC_ACL_2_4Suite : public TestCommand class Test_TC_ACL_2_7Suite : public TestCommand { public: - Test_TC_ACL_2_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_7", 15, credsIssuerConfig) + Test_TC_ACL_2_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_7", 18, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -5685,6 +5693,10 @@ class Test_TC_ACL_2_7Suite : public TestCommand shouldContinue = true; break; case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeIdResponse::DecodableType value; @@ -5693,7 +5705,7 @@ class Test_TC_ACL_2_7Suite : public TestCommand } shouldContinue = true; break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -5701,13 +5713,13 @@ class Test_TC_ACL_2_7Suite : public TestCommand TH2FabricIndex = value; } 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)); { chip::app::DataModel::DecodableList< @@ -5725,7 +5737,7 @@ class Test_TC_ACL_2_7Suite : public TestCommand } } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -5750,7 +5762,7 @@ class Test_TC_ACL_2_7Suite : public TestCommand } } break; - case 13: + case 14: switch (mTestSubStepIndex) { case 0: @@ -5778,7 +5790,7 @@ class Test_TC_ACL_2_7Suite : public TestCommand break; } break; - case 14: + case 15: switch (mTestSubStepIndex) { case 0: @@ -5813,6 +5825,12 @@ class Test_TC_ACL_2_7Suite : public TestCommand break; } 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; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -5848,6 +5866,7 @@ class Test_TC_ACL_2_7Suite : public TestCommand } case 3: { LogStep(3, "Step 3:TH1 puts DUT into commissioning mode"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; @@ -5870,40 +5889,53 @@ class Test_TC_ACL_2_7Suite : public TestCommand ); } case 4: { - LogStep(4, "Waiting after opening commissioning window"); + LogStep(4, "Step 3 & 4: TH1 puts DUT into commissioning mode, TH2 commissions DUT using admin node ID N2"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp"), 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 5: { + LogStep(5, "Waiting after opening commissioning window"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; return WaitForMs(kIdentityAlpha, value); } - case 5: { - LogStep(5, "Step 4:TH2 starts a commissioning process with DUT"); + case 6: { + LogStep(6, "Step 4:TH2 starts a commissioning process with DUT"); + VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); return PairWithCode(kIdentityBeta, value); } - case 6: { - LogStep(6, "DUT is commissioned by TH2 on Fabric ID2 "); + case 7: { + LogStep(7, "DUT is commissioned by TH2 on Fabric ID2 "); + VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; return WaitForCommissionee(kIdentityBeta, value); } - case 7: { - LogStep(7, "Read the TH2 commissioner node ID"); + case 8: { + LogStep(8, "Read the TH2 commissioner node ID"); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type value; return GetCommissionerNodeId(kIdentityBeta, value); } - case 8: { - LogStep(8, "Step 5:TH2 reads OperationalCredentials cluster CurrentFabricIndex attribute"); + case 9: { + LogStep(9, "Step 5:TH2 reads OperationalCredentials cluster CurrentFabricIndex attribute"); return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, + case 10: { + LogStep(10, "Step 6:TH1 writes DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " "AccessControlExtensionStruct containing 1 element"); VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -5925,8 +5957,8 @@ class Test_TC_ACL_2_7Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, value, chip::NullOptional, chip::NullOptional); } - case 10: { - LogStep(10, + case 11: { + LogStep(11, "Step 7:TH2 writes DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " "AccessControlExtensionStruct containing 1 element"); VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -5954,32 +5986,52 @@ class Test_TC_ACL_2_7Suite : public TestCommand return WriteAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, value, chip::NullOptional, chip::NullOptional); } - case 11: { - LogStep(11, "Step 8:TH1 reads AccessControl cluster Extension attribute"); + case 12: { + LogStep(12, "Step 8:TH1 reads AccessControl cluster Extension attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, "Step 9:TH2 reads AccessControl cluster Extension attribute"); + case 13: { + LogStep(13, "Step 9:TH2 reads AccessControl cluster Extension attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "Step 10:TH1 reads DUT Endpoint 0 AccessControl cluster AccessControlExtensionChanged event"); + case 14: { + LogStep(14, "Step 10:TH1 reads DUT Endpoint 0 AccessControl cluster AccessControlExtensionChanged event"); VerifyOrDo(!ShouldSkip("ACL.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); mTestSubStepCount = 1; return ReadEvent(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Events::AccessControlExtensionChanged::Id, false, chip::NullOptional); } - case 14: { - LogStep(14, "Step 11:TH2 reads DUT Endpoint 0 AccessControl cluster AccessControlExtensionChanged event"); + case 15: { + LogStep(15, "Step 11:TH2 reads DUT Endpoint 0 AccessControl cluster AccessControlExtensionChanged event"); VerifyOrDo(!ShouldSkip("ACL.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); mTestSubStepCount = 1; return ReadEvent(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Events::AccessControlExtensionChanged::Id, false, chip::NullOptional); } + case 16: { + LogStep(16, "TH1 writes Extension attribute value as empty list"); + VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + value = chip::app::DataModel::List(); + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, + value, chip::NullOptional, chip::NullOptional); + } + case 17: { + LogStep(17, "TH2 writes Extension attribute value as empty list"); + VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + value = chip::app::DataModel::List(); + return WriteAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, value, + chip::NullOptional, chip::NullOptional); + } } return CHIP_NO_ERROR; } @@ -5988,7 +6040,7 @@ class Test_TC_ACL_2_7Suite : public TestCommand class Test_TC_ACL_2_8Suite : public TestCommand { public: - Test_TC_ACL_2_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_8", 15, credsIssuerConfig) + Test_TC_ACL_2_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_8", 18, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -6073,6 +6125,10 @@ class Test_TC_ACL_2_8Suite : public TestCommand shouldContinue = true; break; case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeIdResponse::DecodableType value; @@ -6081,7 +6137,7 @@ class Test_TC_ACL_2_8Suite : public TestCommand } shouldContinue = true; break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -6089,13 +6145,13 @@ class Test_TC_ACL_2_8Suite : public TestCommand TH2FabricIndex = value; } 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)); { chip::app::DataModel::DecodableList< @@ -6125,7 +6181,7 @@ class Test_TC_ACL_2_8Suite : public TestCommand } } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -6155,7 +6211,7 @@ class Test_TC_ACL_2_8Suite : public TestCommand } } break; - case 13: + case 14: switch (mTestSubStepIndex) { case 0: @@ -6269,7 +6325,7 @@ class Test_TC_ACL_2_8Suite : public TestCommand break; } break; - case 14: + case 15: switch (mTestSubStepIndex) { case 0: @@ -6383,6 +6439,12 @@ class Test_TC_ACL_2_8Suite : public TestCommand break; } 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; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -6418,6 +6480,7 @@ class Test_TC_ACL_2_8Suite : public TestCommand } case 3: { LogStep(3, "TH1 puts DUT into commissioning mode"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; @@ -6441,39 +6504,52 @@ class Test_TC_ACL_2_8Suite : public TestCommand } case 4: { LogStep(4, "Waiting after opening commissioning window"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; return WaitForMs(kIdentityAlpha, value); } case 5: { - LogStep(5, "TH2 starts a commissioning process with DUT"); + LogStep(5, "TH1 puts DUT into commissioning mode, TH2 commissions DUT using admin node ID N2"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp"), 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, "TH2 starts a commissioning process with DUT"); + VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); return PairWithCode(kIdentityBeta, value); } - case 6: { - LogStep(6, "DUT is commissioned by TH2 on Fabric ID2 "); + case 7: { + LogStep(7, "DUT is commissioned by TH2 on Fabric ID2 "); + VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; return WaitForCommissionee(kIdentityBeta, value); } - case 7: { - LogStep(7, "Read the TH2 commissioner node ID"); + case 8: { + LogStep(8, "Read the TH2 commissioner node ID"); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type value; return GetCommissionerNodeId(kIdentityBeta, value); } - case 8: { - LogStep(8, "TH2 reads OperationalCredentials cluster CurrentFabricIndex attribute"); + case 9: { + LogStep(9, "TH2 reads OperationalCredentials cluster CurrentFabricIndex attribute"); return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); + case 10: { + LogStep(10, "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::DataModel::List value; @@ -6505,8 +6581,8 @@ class Test_TC_ACL_2_8Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, chip::NullOptional, chip::NullOptional); } - case 10: { - LogStep(10, "TH2 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); + case 11: { + LogStep(11, "TH2 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::DataModel::List value; @@ -6538,32 +6614,52 @@ class Test_TC_ACL_2_8Suite : public TestCommand return WriteAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, chip::NullOptional, chip::NullOptional); } - case 11: { - LogStep(11, "TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute"); + case 12: { + LogStep(12, "TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, "TH2 reads DUT Endpoint 0 AccessControl cluster ACL attribute"); + case 13: { + LogStep(13, "TH2 reads DUT Endpoint 0 AccessControl cluster ACL attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "TH1 reads DUT Endpoint 0 AccessControl cluster AccessControlEntryChanged event"); + case 14: { + LogStep(14, "TH1 reads DUT Endpoint 0 AccessControl cluster AccessControlEntryChanged event"); VerifyOrDo(!ShouldSkip("ACL.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); mTestSubStepCount = 3; return ReadEvent(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Events::AccessControlEntryChanged::Id, false, chip::NullOptional); } - case 14: { - LogStep(14, "TH2 reads DUT Endpoint 0 AccessControl cluster AccessControlEntryChanged event"); + case 15: { + LogStep(15, "TH2 reads DUT Endpoint 0 AccessControl cluster AccessControlEntryChanged event"); VerifyOrDo(!ShouldSkip("ACL.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); mTestSubStepCount = 3; return ReadEvent(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Events::AccessControlEntryChanged::Id, false, chip::NullOptional); } + case 16: { + LogStep(16, "TH1 writes ACL attribute value is an empty list"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + value = chip::app::DataModel::List(); + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 17: { + LogStep(17, "TH2 writes ACL attribute value is an empty list"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + value = chip::app::DataModel::List(); + return WriteAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); + } } return CHIP_NO_ERROR; } @@ -6572,7 +6668,7 @@ class Test_TC_ACL_2_8Suite : public TestCommand class Test_TC_ACL_2_9Suite : public TestCommand { public: - Test_TC_ACL_2_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_9", 13, credsIssuerConfig) + Test_TC_ACL_2_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_9", 15, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -6696,6 +6792,14 @@ class Test_TC_ACL_2_9Suite : public TestCommand break; } break; + case 13: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -6847,6 +6951,24 @@ class Test_TC_ACL_2_9Suite : public TestCommand return ReadEvent(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Events::AccessControlExtensionChanged::Id, false, chip::NullOptional); } + case 13: { + LogStep(13, "Test cleanup: Reset Devices to factory defaults"); + VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; + return FactoryReset(kIdentityAlpha, value); + } + case 14: { + LogStep(14, "Test cleanup: Reset Devices to factory defaults"); + 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("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; } @@ -6855,7 +6977,7 @@ class Test_TC_ACL_2_9Suite : public TestCommand class Test_TC_ACL_2_10Suite : public TestCommand { public: - Test_TC_ACL_2_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_10", 26, credsIssuerConfig) + Test_TC_ACL_2_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_10", 31, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -6944,6 +7066,10 @@ class Test_TC_ACL_2_10Suite : public TestCommand shouldContinue = true; break; case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeIdResponse::DecodableType value; @@ -6952,7 +7078,7 @@ class Test_TC_ACL_2_10Suite : public TestCommand } shouldContinue = true; break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -6960,9 +7086,6 @@ class Test_TC_ACL_2_10Suite : public TestCommand TH2FabricIndex = value; } 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; @@ -6974,7 +7097,6 @@ class Test_TC_ACL_2_10Suite : public TestCommand break; case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -6990,8 +7112,12 @@ class Test_TC_ACL_2_10Suite : public TestCommand 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)); + break; + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -7009,7 +7135,7 @@ class Test_TC_ACL_2_10Suite : public TestCommand } } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -7053,24 +7179,30 @@ class Test_TC_ACL_2_10Suite : public TestCommand } } break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 22: + 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)); { chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); } break; - case 23: + case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 24: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList< @@ -7088,10 +7220,16 @@ class Test_TC_ACL_2_10Suite : public TestCommand } } break; - case 25: + 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)); + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -7127,6 +7265,7 @@ class Test_TC_ACL_2_10Suite : public TestCommand } case 3: { LogStep(3, "Step 3:TH1 puts DUT into commissioning mode"); + VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY && CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; @@ -7150,39 +7289,52 @@ class Test_TC_ACL_2_10Suite : public TestCommand } case 4: { LogStep(4, "Waiting after opening commissioning window"); + VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY && CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; return WaitForMs(kIdentityAlpha, value); } case 5: { - LogStep(5, "TH2 starts a commissioning process with DUT"); + LogStep(5, "TH1 puts DUT into commissioning mode, TH2 commissions DUT using admin node ID N2"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp"), 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, "TH2 starts a commissioning process with DUT"); + VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); return PairWithCode(kIdentityBeta, value); } - case 6: { - LogStep(6, "DUT is commissioned by TH2 on Fabric ID2 "); + case 7: { + LogStep(7, "DUT is commissioned by TH2 on Fabric ID2"); + VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; return WaitForCommissionee(kIdentityBeta, value); } - case 7: { - LogStep(7, "Read the TH2 commissioner node ID"); + case 8: { + LogStep(8, "Read the TH2 commissioner node ID"); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type value; return GetCommissionerNodeId(kIdentityBeta, value); } - case 8: { - LogStep(8, "Step 4:TH2 reads OperationalCredentials cluster CurrentFabricIndex attribute"); + case 9: { + LogStep(9, "Step 4:TH2 reads OperationalCredentials cluster CurrentFabricIndex attribute"); return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "Step 5:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); + case 10: { + LogStep(10, "Step 5:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::DataModel::List value; @@ -7229,8 +7381,8 @@ class Test_TC_ACL_2_10Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, chip::NullOptional, chip::NullOptional); } - case 10: { - LogStep(10, "Step 6:TH2 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); + case 11: { + LogStep(11, "Step 6:TH2 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::DataModel::List value; @@ -7277,8 +7429,8 @@ class Test_TC_ACL_2_10Suite : public TestCommand return WriteAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, chip::NullOptional, chip::NullOptional); } - case 11: { - LogStep(11, + case 12: { + LogStep(12, "Step 7:TH1 writes DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " "AccessControlExtensionStruct containing 1 element 1.struct, Data field: D_OK_EMPTY"); VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -7300,8 +7452,8 @@ class Test_TC_ACL_2_10Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, value, chip::NullOptional, chip::NullOptional); } - case 12: { - LogStep(12, + case 13: { + LogStep(13, "Step 8:TH2 writes DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " "AccessControlExtensionStruct containing 1 element 1.struct, Data field: D_OK_SINGLE"); VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -7329,15 +7481,15 @@ class Test_TC_ACL_2_10Suite : public TestCommand return WriteAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, value, chip::NullOptional, chip::NullOptional); } - case 13: { - LogStep(13, "Step 9: Reboot DUT"); + case 14: { + LogStep(14, "Step 9: Reboot DUT"); VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; return Reboot(kIdentityAlpha, value); } - case 14: { - LogStep(14, "Step 9: Reboot DUT"); + case 15: { + LogStep(15, "Step 9: Reboot DUT"); VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -7347,22 +7499,24 @@ class Test_TC_ACL_2_10Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 15: { - LogStep(15, "TH1 Connects to the device again"); + case 16: { + LogStep(16, "TH1 Connects to the device again"); + VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee(kIdentityAlpha, value); } - case 16: { - LogStep(16, "TH2 Connects to the device again"); + case 17: { + LogStep(17, "TH2 Connects to the device again"); + VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; return WaitForCommissionee(kIdentityBeta, value); } - case 17: { - LogStep(17, "Step 10:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); + case 18: { + LogStep(18, "Step 10:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::DataModel::List value; @@ -7409,22 +7563,22 @@ class Test_TC_ACL_2_10Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, chip::NullOptional, chip::NullOptional); } - case 18: { - LogStep(18, + case 19: { + LogStep(19, "Step 11:TH1 reads DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " "AccessControlExtensionStruct containing 1 element"); VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, true, chip::NullOptional); } - case 19: { - LogStep(19, "Step 12:TH2 reads DUT Endpoint 0 AccessControl cluster ACL attribute"); + case 20: { + LogStep(20, "Step 12:TH2 reads DUT Endpoint 0 AccessControl cluster ACL attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, chip::NullOptional); } - case 20: { - LogStep(20, "Step 13:TH2 reads DUT Endpoint 0 AccessControl cluster Extension attribute"); + case 21: { + LogStep(21, "Step 13:TH2 reads DUT Endpoint 0 AccessControl cluster Extension attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::DataModel::List value; @@ -7450,8 +7604,8 @@ class Test_TC_ACL_2_10Suite : public TestCommand return WriteAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, value, chip::NullOptional, chip::NullOptional); } - case 21: { - LogStep(21, "Step 14: If DUT is an app on host, examine persistent storage in /tmp/chip_kvs text file"); + case 22: { + LogStep(22, "Step 14: If DUT is an app on host, examine persistent storage in /tmp/chip_kvs text file"); VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -7460,8 +7614,28 @@ class Test_TC_ACL_2_10Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 22: { - LogStep(22, "Step 15:TH1 removes fabric F2 from DUT"); + case 23: { + LogStep(23, "TH2 writes Extension attibute value as empty list"); + VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + value = chip::app::DataModel::List(); + return WriteAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 24: { + LogStep(24, "TH2 writes ACL attribute value is an empty list"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + value = chip::app::DataModel::List(); + return WriteAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 25: { + LogStep(25, "Step 15:TH1 removes fabric F2 from DUT"); VerifyOrDo(!ShouldSkip("OPCREDS.S.C0a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type value; @@ -7472,8 +7646,8 @@ class Test_TC_ACL_2_10Suite : public TestCommand ); } - case 23: { - LogStep(23, "Step 16:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); + case 26: { + LogStep(26, "Step 16:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::DataModel::List value; @@ -7520,16 +7694,16 @@ class Test_TC_ACL_2_10Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, chip::NullOptional, chip::NullOptional); } - case 24: { - LogStep(24, + case 27: { + LogStep(27, "Step 17:TH1 reads DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " "AccessControlExtensionStruct containing 1 element"); VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, true, chip::NullOptional); } - case 25: { - LogStep(25, "Step 18: If DUT is an app on host, examine persistent storage in /tmp/chip_kvs text file"); + case 28: { + LogStep(28, "Step 18: If DUT is an app on host, examine persistent storage in /tmp/chip_kvs text file"); VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -7538,6 +7712,26 @@ class Test_TC_ACL_2_10Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } + case 29: { + LogStep(29, "TH1 writes Extension attribute value as empty list"); + VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + value = chip::app::DataModel::List(); + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, + value, chip::NullOptional, chip::NullOptional); + } + case 30: { + LogStep(30, "TH1 writes ACL attribute value is an empty list"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + value = chip::app::DataModel::List(); + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); + } } return CHIP_NO_ERROR; } @@ -9005,11 +9199,10 @@ class Test_TC_BOOL_2_1Suite : public TestCommand } }; -class Test_TC_BRBINFO_1_1Suite : public TestCommand +class Test_TC_ACT_1_1Suite : public TestCommand { public: - Test_TC_BRBINFO_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_BRBINFO_1_1", 20, credsIssuerConfig) + Test_TC_ACT_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_1_1", 7, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -9017,7 +9210,7 @@ class Test_TC_BRBINFO_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BRBINFO_1_1Suite() {} + ~Test_TC_ACT_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -9070,7 +9263,8 @@ class Test_TC_BRBINFO_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 17UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); @@ -9084,127 +9278,161 @@ class Test_TC_BRBINFO_1_1Suite : public TestCommand chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintMaxLength("value", value, 11)); } break; case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 11UL)); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + } VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 12UL)); } break; - case 14: + 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 global attribute: ClusterRevision"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Actions::Id, Actions::Attributes::ClusterRevision::Id, true, + chip::NullOptional); + } + case 2: { + LogStep(2, "Read the global attribute: FeatureMap"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Actions::Id, Actions::Attributes::FeatureMap::Id, true, + chip::NullOptional); + } + case 3: { + LogStep(3, "Read the global attribute: AttributeList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Actions::Id, Actions::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 4: { + LogStep(4, "Read the optional attribute(SetupURL) in AttributeList"); + VerifyOrDo(!ShouldSkip("ACT.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Actions::Id, Actions::Attributes::AttributeList::Id, true, + chip::NullOptional); + } + case 5: { + LogStep(5, "Read the global attribute: AcceptedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Actions::Id, Actions::Attributes::AcceptedCommandList::Id, true, + chip::NullOptional); + } + case 6: { + LogStep(6, "Read the global attribute: GeneratedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Actions::Id, Actions::Attributes::GeneratedCommandList::Id, true, + chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_BIND_1_1Suite : public TestCommand +{ +public: + Test_TC_BIND_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BIND_1_1", 6, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_BIND_1_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 13UL)); - } + shouldContinue = true; break; - case 15: + case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 14UL)); + VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; - case 16: + case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 15UL)); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); } break; - case 17: + case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 18UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 18: + case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -9216,7 +9444,7 @@ class Test_TC_BRBINFO_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 19: + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -9252,123 +9480,38 @@ class Test_TC_BRBINFO_1_1Suite : public TestCommand } case 1: { LogStep(1, "TH reads the ClusterRevision from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::ClusterRevision::Id, true, chip::NullOptional); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Binding::Id, Binding::Attributes::ClusterRevision::Id, true, + chip::NullOptional); } case 2: { LogStep(2, "TH reads the FeatureMap from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::FeatureMap::Id, true, chip::NullOptional); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Binding::Id, Binding::Attributes::FeatureMap::Id, true, + chip::NullOptional); } case 3: { LogStep(3, "TH reads AttributeList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Binding::Id, Binding::Attributes::AttributeList::Id, true, + chip::NullOptional); } case 4: { - LogStep(4, "TH reads optional attribute(VendorName) in AttributeList"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); + LogStep(4, "TH reads AcceptedCommandList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Binding::Id, Binding::Attributes::AcceptedCommandList::Id, true, + chip::NullOptional); } case 5: { - LogStep(5, "TH reads optional attribute(VendorID) in AttributeList"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "TH reads optional attribute(ProductName) in AttributeList"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 7: { - LogStep(7, "TH reads optional attribute(NodeLabel) in AttributeList"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 8: { - LogStep(8, "TH reads optional attribute(HardwareVersion) in AttributeList"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 9: { - LogStep(9, "TH reads optional attribute(HardwareVersionString) in AttributeList"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 10: { - LogStep(10, "TH reads optional attribute(SoftwareVersion) in AttributeList"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 11: { - LogStep(11, "TH reads optional attribute(SoftwareVersionString) in AttributeList"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 12: { - LogStep(12, "TH reads optional attribute(ManufacturingDate) in AttributeList"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 13: { - LogStep(13, "TH reads optional attribute(PartNumber) in AttributeList"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 14: { - LogStep(14, "TH reads optional attribute(ProductURL) in AttributeList"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 15: { - LogStep(15, "TH reads optional attribute(ProductLabel) in AttributeList"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 16: { - LogStep(16, "TH reads optional attribute(SerialNumber) in AttributeList"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 17: { - LogStep(17, "TH reads optional attribute(UniqueID) in AttributeList"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); - } - case 18: { - LogStep(18, "TH1 reads AcceptedCommandList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 19: { - LogStep(19, "TH1 reads GeneratedCommandList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + LogStep(5, "TH reads GeneratedCommandList from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Binding::Id, Binding::Attributes::GeneratedCommandList::Id, true, + chip::NullOptional); } } return CHIP_NO_ERROR; } }; -class Test_TC_BRBINFO_2_1Suite : public TestCommand +class Test_TC_CC_1_1Suite : public TestCommand { public: - Test_TC_BRBINFO_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_BRBINFO_2_1", 50, credsIssuerConfig) + Test_TC_CC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_1_1", 47, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -9376,64 +9519,7 @@ class Test_TC_BRBINFO_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BRBINFO_2_1Suite() - { - if (VendorNameValueBuffer != nullptr) - { - chip::Platform::MemoryFree(VendorNameValueBuffer); - VendorNameValueBuffer = nullptr; - } - if (ProductNameValueBuffer != nullptr) - { - chip::Platform::MemoryFree(ProductNameValueBuffer); - ProductNameValueBuffer = nullptr; - } - if (NodeLabelValueBuffer != nullptr) - { - chip::Platform::MemoryFree(NodeLabelValueBuffer); - NodeLabelValueBuffer = nullptr; - } - if (HardwareVersionStringValueBuffer != nullptr) - { - chip::Platform::MemoryFree(HardwareVersionStringValueBuffer); - HardwareVersionStringValueBuffer = nullptr; - } - if (SoftwareVersionStringValueBuffer != nullptr) - { - chip::Platform::MemoryFree(SoftwareVersionStringValueBuffer); - SoftwareVersionStringValueBuffer = nullptr; - } - if (ManufacturingDateValueBuffer != nullptr) - { - chip::Platform::MemoryFree(ManufacturingDateValueBuffer); - ManufacturingDateValueBuffer = nullptr; - } - if (PartNumberValueBuffer != nullptr) - { - chip::Platform::MemoryFree(PartNumberValueBuffer); - PartNumberValueBuffer = nullptr; - } - if (ProductURLValueBuffer != nullptr) - { - chip::Platform::MemoryFree(ProductURLValueBuffer); - ProductURLValueBuffer = nullptr; - } - if (ProductLabelValueBuffer != nullptr) - { - chip::Platform::MemoryFree(ProductLabelValueBuffer); - ProductLabelValueBuffer = nullptr; - } - if (SerialNumberValueBuffer != nullptr) - { - chip::Platform::MemoryFree(SerialNumberValueBuffer); - SerialNumberValueBuffer = nullptr; - } - if (UniqueIDValueBuffer != nullptr) - { - chip::Platform::MemoryFree(UniqueIDValueBuffer); - UniqueIDValueBuffer = nullptr; - } - } + ~Test_TC_CC_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -9446,32 +9532,6 @@ class Test_TC_BRBINFO_2_1Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; - char * VendorNameValueBuffer = nullptr; - chip::CharSpan VendorNameValue; - chip::VendorId VendorIDValue; - char * ProductNameValueBuffer = nullptr; - chip::CharSpan ProductNameValue; - char * NodeLabelValueBuffer = nullptr; - chip::CharSpan NodeLabelValue; - uint16_t HardwareVersionValue; - char * HardwareVersionStringValueBuffer = nullptr; - chip::CharSpan HardwareVersionStringValue; - uint32_t SoftwareVersionValue; - char * SoftwareVersionStringValueBuffer = nullptr; - chip::CharSpan SoftwareVersionStringValue; - char * ManufacturingDateValueBuffer = nullptr; - chip::CharSpan ManufacturingDateValue; - char * PartNumberValueBuffer = nullptr; - chip::CharSpan PartNumberValue; - char * ProductURLValueBuffer = nullptr; - chip::CharSpan ProductURLValue; - char * ProductLabelValueBuffer = nullptr; - chip::CharSpan ProductLabelValue; - char * SerialNumberValueBuffer = nullptr; - chip::CharSpan SerialNumberValue; - char * UniqueIDValueBuffer = nullptr; - chip::CharSpan UniqueIDValue; - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -9491,399 +9551,426 @@ class Test_TC_BRBINFO_2_1Suite : public TestCommand case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::CharSpan value; + uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); - if (VendorNameValueBuffer != nullptr) - { - chip::Platform::MemoryFree(VendorNameValueBuffer); - } - VendorNameValueBuffer = static_cast(chip::Platform::MemoryAlloc(value.size())); - memcpy(VendorNameValueBuffer, value.data(), value.size()); - VendorNameValue = chip::CharSpan(VendorNameValueBuffer, value.size()); + VerifyOrReturn(CheckValue("clusterRevision", value, 5U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); } break; case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + } break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::CharSpan value; + uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("vendorName", value, VendorNameValue)); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); } break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::VendorId value; + uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "vendor_id", "vendor_id")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 1U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65521U)); - VendorIDValue = value; + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); } break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 4UL)); + } break; case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 8UL)); + } break; case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::VendorId value; + uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("vendorID", value, VendorIDValue)); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 16UL)); } break; case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::CharSpan value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); - if (ProductNameValueBuffer != nullptr) - { - chip::Platform::MemoryFree(ProductNameValueBuffer); - } - ProductNameValueBuffer = static_cast(chip::Platform::MemoryAlloc(value.size())); - memcpy(ProductNameValueBuffer, value.data(), value.size()); - ProductNameValue = chip::CharSpan(ProductNameValueBuffer, value.size()); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 15UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 16385UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 16394UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + } break; case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::CharSpan value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("productName", value, ProductNameValue)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); } break; case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::CharSpan value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); - if (NodeLabelValueBuffer != nullptr) - { - chip::Platform::MemoryFree(NodeLabelValueBuffer); - } - NodeLabelValueBuffer = static_cast(chip::Platform::MemoryAlloc(value.size())); - memcpy(NodeLabelValueBuffer, value.data(), value.size()); - NodeLabelValue = chip::CharSpan(NodeLabelValueBuffer, value.size()); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + } break; case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + } break; case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65534U)); - HardwareVersionValue = value; + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); } break; case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); + } break; case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("hardwareVersion", value, HardwareVersionValue)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); } break; case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::CharSpan value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMinLength("value", value, 1)); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 64)); - if (HardwareVersionStringValueBuffer != nullptr) - { - chip::Platform::MemoryFree(HardwareVersionStringValueBuffer); - } - HardwareVersionStringValueBuffer = static_cast(chip::Platform::MemoryAlloc(value.size())); - memcpy(HardwareVersionStringValueBuffer, value.data(), value.size()); - HardwareVersionStringValue = chip::CharSpan(HardwareVersionStringValueBuffer, value.size()); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 16384UL)); } break; case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + 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, 16386UL)); + } break; case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::CharSpan value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("hardwareVersionString", value, HardwareVersionStringValue)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 16387UL)); } break; case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint32_t value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0UL)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4294967294UL)); - SoftwareVersionValue = value; + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 16388UL)); } break; case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + 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, 16389UL)); + } break; case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint32_t value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("softwareVersion", value, SoftwareVersionValue)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 16390UL)); } break; case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::CharSpan value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinLength("value", value, 1)); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 64)); - if (SoftwareVersionStringValueBuffer != nullptr) - { - chip::Platform::MemoryFree(SoftwareVersionStringValueBuffer); - } - SoftwareVersionStringValueBuffer = static_cast(chip::Platform::MemoryAlloc(value.size())); - memcpy(SoftwareVersionStringValueBuffer, value.data(), value.size()); - SoftwareVersionStringValue = chip::CharSpan(SoftwareVersionStringValueBuffer, value.size()); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 16395UL)); } break; case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + 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, 16396UL)); + } break; case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::CharSpan value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("softwareVersionString", value, SoftwareVersionStringValue)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 16397UL)); } break; case 26: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::CharSpan value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMinLength("value", value, 8)); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 16)); - if (ManufacturingDateValueBuffer != nullptr) - { - chip::Platform::MemoryFree(ManufacturingDateValueBuffer); - } - ManufacturingDateValueBuffer = static_cast(chip::Platform::MemoryAlloc(value.size())); - memcpy(ManufacturingDateValueBuffer, value.data(), value.size()); - ManufacturingDateValue = chip::CharSpan(ManufacturingDateValueBuffer, value.size()); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 16400UL)); } break; case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + } break; case 28: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + } break; case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::CharSpan value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("manufacturingDate", value, ManufacturingDateValue)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); } break; case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::CharSpan value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); - if (PartNumberValueBuffer != nullptr) - { - chip::Platform::MemoryFree(PartNumberValueBuffer); - } - PartNumberValueBuffer = static_cast(chip::Platform::MemoryAlloc(value.size())); - memcpy(PartNumberValueBuffer, value.data(), value.size()); - PartNumberValue = chip::CharSpan(PartNumberValueBuffer, value.size()); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); } break; case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + } break; case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::CharSpan value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("partNumber", value, PartNumberValue)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); } break; case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::CharSpan value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "long_char_string", "long_char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 256)); - if (ProductURLValueBuffer != nullptr) - { - chip::Platform::MemoryFree(ProductURLValueBuffer); - } - ProductURLValueBuffer = static_cast(chip::Platform::MemoryAlloc(value.size())); - memcpy(ProductURLValueBuffer, value.data(), value.size()); - ProductURLValue = chip::CharSpan(ProductURLValueBuffer, value.size()); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); } break; case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); + } break; case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); + } break; case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::CharSpan value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("productURL", value, ProductURLValue)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); } break; case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::CharSpan value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 64)); - if (ProductLabelValueBuffer != nullptr) - { - chip::Platform::MemoryFree(ProductLabelValueBuffer); - } - ProductLabelValueBuffer = static_cast(chip::Platform::MemoryAlloc(value.size())); - memcpy(ProductLabelValueBuffer, value.data(), value.size()); - ProductLabelValue = chip::CharSpan(ProductLabelValueBuffer, value.size()); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); } break; case 38: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 64UL)); + } break; case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + 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, 65UL)); + } break; case 40: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::CharSpan value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("productLabel", value, ProductLabelValue)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 66UL)); } break; case 41: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::CharSpan value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); - if (SerialNumberValueBuffer != nullptr) - { - chip::Platform::MemoryFree(SerialNumberValueBuffer); - } - SerialNumberValueBuffer = static_cast(chip::Platform::MemoryAlloc(value.size())); - memcpy(SerialNumberValueBuffer, value.data(), value.size()); - SerialNumberValue = chip::CharSpan(SerialNumberValueBuffer, value.size()); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 67UL)); } break; case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + 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, 68UL)); + } break; case 43: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::CharSpan value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("serialNumber", value, SerialNumberValue)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 71UL)); } break; case 44: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - bool value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("reachable", value, true)); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 75UL)); } break; case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 46: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - bool value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("reachable", value, true)); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 76UL)); } break; - case 47: + case 46: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::CharSpan value; + chip::app::DataModel::DecodableList value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); - if (UniqueIDValueBuffer != nullptr) { - chip::Platform::MemoryFree(UniqueIDValueBuffer); + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); } - UniqueIDValueBuffer = static_cast(chip::Platform::MemoryAlloc(value.size())); - memcpy(UniqueIDValueBuffer, value.data(), value.size()); - UniqueIDValue = chip::CharSpan(UniqueIDValueBuffer, value.size()); - } - break; - case 48: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); - break; - case 49: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("uniqueID", value, UniqueIDValue)); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; default: @@ -9909,390 +9996,288 @@ class Test_TC_BRBINFO_2_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "TH reads VendorName from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::VendorName::Id, true, chip::NullOptional); + LogStep(1, "read the global attribute: ClusterRevision"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ClusterRevision::Id, + true, chip::NullOptional); } case 2: { - LogStep(2, "TH writes VendorName from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("samplegarbage: not in length on purpose", 6); - return WriteAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::VendorName::Id, value, chip::NullOptional, - chip::NullOptional); + LogStep(2, "Read the global attribute: FeatureMap"); + VerifyOrDo(!ShouldSkip("( !CC.S.F00 && !CC.S.F01 && !CC.S.F02 && !CC.S.F03 && !CC.S.F04 )"), + return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::FeatureMap::Id, true, + chip::NullOptional); } case 3: { - LogStep(3, "TH reads VendorName from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::VendorName::Id, true, chip::NullOptional); + LogStep(3, "Given CC.S.F00(HS) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::FeatureMap::Id, true, + chip::NullOptional); } case 4: { - LogStep(4, "TH reads VendorID from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::VendorID::Id, true, chip::NullOptional); + LogStep(4, "Given CC.S.F01(EHue) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::FeatureMap::Id, true, + chip::NullOptional); } case 5: { - LogStep(5, "Verify that VendorID matches the value assigned to this manufacturer"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && BRBINFO.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(5, "Given CC.S.F02(CL) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("CC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::FeatureMap::Id, true, + chip::NullOptional); } case 6: { - LogStep(6, "TH writes VendorID from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::VendorId value; - value = static_cast(17); - return WriteAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::VendorID::Id, value, chip::NullOptional, - chip::NullOptional); + LogStep(6, "Given CC.S.F03(XY) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::FeatureMap::Id, true, + chip::NullOptional); } case 7: { - LogStep(7, "TH reads VendorID from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::VendorID::Id, true, chip::NullOptional); + LogStep(7, "Given CC.S.F04(CT) ensure featuremap has the correct bit set"); + VerifyOrDo(!ShouldSkip("CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::FeatureMap::Id, true, + chip::NullOptional); } case 8: { - LogStep(8, "TH reads ProductName from the DUT"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::ProductName::Id, true, chip::NullOptional); + LogStep(8, "Read the global attribute: AttributeList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + true, chip::NullOptional); } case 9: { - LogStep(9, "TH writes ProductName from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("newproductgarbage: not in length on purpose", 10); - return WriteAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::ProductName::Id, value, chip::NullOptional, - chip::NullOptional); + LogStep(9, "Read the optional attribute(CurrentHue) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + true, chip::NullOptional); } case 10: { - LogStep(10, "TH reads ProductName from the DUT"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::ProductName::Id, true, chip::NullOptional); + LogStep(10, "Read the optional attribute(CurrentSaturation) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + true, chip::NullOptional); } case 11: { - LogStep(11, "TH reads NodeLabel from the DUT"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::NodeLabel::Id, true, chip::NullOptional); + LogStep(11, "Read the optional attribute(RemainingTime) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + true, chip::NullOptional); } case 12: { - LogStep(12, "TH writes NodeLabel from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0005 && 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(12, "Read the optional attribute(CurrentX) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + true, chip::NullOptional); } case 13: { - LogStep(13, "TH reads NodeLabel from the DUT"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0005 && 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(13, "Read the optional attribute(CurrentY) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + true, chip::NullOptional); } case 14: { - LogStep(14, "TH reads HardwareVersion from the DUT"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::HardwareVersion::Id, true, chip::NullOptional); + LogStep(14, "Read the optional attribute(DriftCompensation) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + true, chip::NullOptional); } case 15: { - LogStep(15, "TH writes HardwareVersion from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint16_t value; - value = 17713U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::HardwareVersion::Id, value, chip::NullOptional, - chip::NullOptional); + LogStep(15, "Read the optional attribute(CompensationText) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + true, chip::NullOptional); } case 16: { - LogStep(16, "TH reads HardwareVersion from the DUT"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::HardwareVersion::Id, true, chip::NullOptional); + LogStep(16, "Read the optional attribute(ColorTemperatureMireds) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + true, chip::NullOptional); } case 17: { - LogStep(17, "TH reads HardwareVersionString from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::HardwareVersionString::Id, true, chip::NullOptional); + LogStep(17, "Read the optional attribute(EnhancedCurrentHue) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + true, chip::NullOptional); } case 18: { - LogStep(18, "TH writes HardwareVersionString from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("newhardwareversiongarbage: not in length on purpose", 18); - return WriteAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::HardwareVersionString::Id, value, chip::NullOptional, - chip::NullOptional); + LogStep(18, "Read the optional attribute(ColorLoopActive) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + true, chip::NullOptional); } case 19: { - LogStep(19, "TH reads HardwareVersionString from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::HardwareVersionString::Id, true, chip::NullOptional); + LogStep(19, "Read the optional attribute(ColorLoopDirection) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + true, chip::NullOptional); } case 20: { - LogStep(20, "TH reads SoftwareVersion from the DUT"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::SoftwareVersion::Id, true, chip::NullOptional); + LogStep(20, "Read the optional attribute(ColorLoopTime) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A4004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + true, chip::NullOptional); } case 21: { - LogStep(21, "TH writes SoftwareVersion from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint32_t value; - value = 33299UL; - return WriteAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::SoftwareVersion::Id, value, chip::NullOptional, - chip::NullOptional); + LogStep(21, "Read the optional attribute(ColorLoopStartEnhancedHue) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + true, chip::NullOptional); } case 22: { - LogStep(22, "TH reads SoftwareVersion from the DUT"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::SoftwareVersion::Id, true, chip::NullOptional); + LogStep(22, "Read the optional attribute(ColorLoopStoredEnhancedHue) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + true, chip::NullOptional); } case 23: { - LogStep(23, "TH reads SoftwareVersionString from the DUT"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::Id, true, chip::NullOptional); + LogStep(23, "Read the optional attribute(ColorTempPhysicalMinMireds) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A400b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + true, chip::NullOptional); } case 24: { - LogStep(24, "TH writes SoftwareVersionString from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("1.0garbage: not in length on purpose", 3); - return WriteAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::Id, value, chip::NullOptional, - chip::NullOptional); + LogStep(24, "Read the optional attribute(ColorTempPhysicalMaxMireds) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A400c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + true, chip::NullOptional); } case 25: { - LogStep(25, "TH reads SoftwareVersionString from the DUT"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::SoftwareVersionString::Id, true, chip::NullOptional); + LogStep(25, "Read the optional attribute(CoupleColorTempToLevelMinMireds) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A400d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + true, chip::NullOptional); } case 26: { - LogStep(26, "TH reads ManufacturingDate from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::ManufacturingDate::Id, true, chip::NullOptional); + LogStep(26, "Read the optional attribute(StartUpColorTemperatureMireds) in AttributeList"); + VerifyOrDo(!ShouldSkip("CC.S.A4010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + true, chip::NullOptional); } case 27: { - LogStep(27, "Verify if the first 8 characters specify date according to ISO 8601, i.e, YYYYMMDD."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && BRBINFO.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(27, "Read the optional command(MoveToHue) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 28: { - LogStep(28, "TH writes ManufacturingDate from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("20210814789452INgarbage: not in length on purpose", 16); - return WriteAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::ManufacturingDate::Id, value, chip::NullOptional, - chip::NullOptional); + LogStep(28, "Read the optional command(MoveHue) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 29: { - LogStep(29, "TH reads ManufacturingDate from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::ManufacturingDate::Id, true, chip::NullOptional); + LogStep(29, "Read the optional command(StepHue) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("CC.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 30: { - LogStep(30, "TH reads PartNumber from the DUT"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::PartNumber::Id, true, chip::NullOptional); + LogStep(30, "Read the optional command(MoveToSaturation) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("CC.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 31: { - LogStep(31, "TH writes PartNumber from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("newpartgarbage: not in length on purpose", 7); - return WriteAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::PartNumber::Id, value, chip::NullOptional, - chip::NullOptional); + LogStep(31, "Read the optional command(MoveSaturation) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 32: { - LogStep(32, "TH reads PartNumber from the DUT"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::PartNumber::Id, true, chip::NullOptional); + LogStep(32, "Read the optional command(StepSaturation) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("CC.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 33: { - LogStep(33, "TH reads ProductURL from the DUT"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::ProductURL::Id, true, chip::NullOptional); + LogStep(33, "Read the optional command(MoveToHueAndSaturation) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("CC.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 34: { - LogStep(34, - "Verify that it specifies a link to a specific web page, Verify that it follows the syntax rules specified in " - "RFC 3986."); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && BRBINFO.S.A000d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(34, "Read the optional command(MoveToColor) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 35: { - LogStep(35, "TH writes ProductURL from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("https://www.example.comgarbage: not in length on purpose", 23); - return WriteAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::ProductURL::Id, value, chip::NullOptional, - chip::NullOptional); + LogStep(35, "Read the optional command(MoveColor) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 36: { - LogStep(36, "TH reads ProductURL from the DUT"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::ProductURL::Id, true, chip::NullOptional); + LogStep(36, "Read the optional command(StepColor) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("CC.S.C09.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 37: { - LogStep(37, "TH reads ProductLabel from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::ProductLabel::Id, true, chip::NullOptional); + LogStep(37, "Read the optional command(MoveToColorTemperature) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("CC.S.C0a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 38: { - LogStep(38, "Verify that it does not include the name of the vendor as defined within the VendorName attribute"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && BRBINFO.S.A000e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(38, "Read the optional command(EnhancedMoveToHue) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 39: { - LogStep(39, "TH writes ProductLabel from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("newproductlabelgarbage: not in length on purpose", 15); - return WriteAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::ProductLabel::Id, value, chip::NullOptional, - chip::NullOptional); + LogStep(39, "Read the optional command(EnhancedMoveHue) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 40: { - LogStep(40, "TH reads ProductLabel from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000e"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::ProductLabel::Id, true, chip::NullOptional); + LogStep(40, "Read the optional command(EnhancedStepHue) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("CC.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 41: { - LogStep(41, "TH reads SerialNumber from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::SerialNumber::Id, true, chip::NullOptional); + LogStep(41, "Read the optional command(EnhancedMoveToHueAndSaturation) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("CC.S.C43.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 42: { - LogStep(42, "TH writes SerialNumber from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("newserialnumbergarbage: not in length on purpose", 15); - return WriteAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::SerialNumber::Id, value, chip::NullOptional, - chip::NullOptional); + LogStep(42, "Read the optional command(ColorLoopSet) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 43: { - LogStep(43, "TH reads SerialNumber from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::SerialNumber::Id, true, chip::NullOptional); + LogStep(43, "Read the optional command(StopMoveStep) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 44: { - LogStep(44, "TH reads Reachable from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::Reachable::Id, true, chip::NullOptional); + LogStep(44, "Read the optional command(MoveColorTemperature) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("CC.S.C4b.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 45: { - LogStep(45, "TH sends Write request message to DUT to change value of Reachable to false"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - bool value; - value = false; - return WriteAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::Reachable::Id, value, chip::NullOptional, - chip::NullOptional); + LogStep(45, "Read the optional command(StepColorTemperature) in AcceptedCommandList"); + VerifyOrDo(!ShouldSkip("CC.S.C4c.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } case 46: { - LogStep(46, "TH reads Reachable from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::Reachable::Id, true, chip::NullOptional); - } - case 47: { - LogStep(47, "TH reads UniqueID from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::UniqueID::Id, true, chip::NullOptional); - } - case 48: { - LogStep(48, "TH writes UniqueID from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("newidgarbage: not in length on purpose", 5); - return WriteAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::UniqueID::Id, value, chip::NullOptional, - chip::NullOptional); - } - case 49: { - LogStep(49, "TH reads UniqueID from the DUT."); - VerifyOrDo(!ShouldSkip("BRBINFO.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::UniqueID::Id, true, chip::NullOptional); + LogStep(46, "Read the global attribute: GeneratedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } } return CHIP_NO_ERROR; } }; -class Test_TC_ACT_1_1Suite : public TestCommand +class Test_TC_CC_2_1Suite : public TestCommand { public: - Test_TC_ACT_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_1_1", 7, credsIssuerConfig) + Test_TC_CC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_2_1", 54, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -10300,7 +10285,7 @@ class Test_TC_ACT_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ACT_1_1Suite() {} + ~Test_TC_CC_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -10313,6 +10298,8 @@ class Test_TC_ACT_1_1Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; + uint32_t FeatureMapValue; + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -10332,735 +10319,421 @@ class Test_TC_ACT_1_1Suite : public TestCommand case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint32_t value; + uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65534U)); } break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 11)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; case 6: 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))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 4U)); } 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 global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Actions::Id, Actions::Attributes::ClusterRevision::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "Read the global attribute: FeatureMap"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Actions::Id, Actions::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Read the global attribute: AttributeList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Actions::Id, Actions::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "Read the optional attribute(SetupURL) in AttributeList"); - VerifyOrDo(!ShouldSkip("ACT.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Actions::Id, Actions::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Actions::Id, Actions::Attributes::AcceptedCommandList::Id, true, - chip::NullOptional); - } - case 6: { - LogStep(6, "Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Actions::Id, Actions::Attributes::GeneratedCommandList::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BIND_1_1Suite : public TestCommand -{ -public: - Test_TC_BIND_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BIND_1_1", 6, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BIND_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::CharSpan value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMaxLength("value", value, 254)); + } break; - case 1: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 2: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint32_t value; + uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); } break; - case 3: + case 10: 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(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 4U)); } break; - case 4: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; - case 5: + case 12: 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))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "TH reads the ClusterRevision from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Binding::Id, Binding::Attributes::ClusterRevision::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "TH reads the FeatureMap from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Binding::Id, Binding::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "TH reads AttributeList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Binding::Id, Binding::Attributes::AttributeList::Id, true, - chip::NullOptional); - } - case 4: { - LogStep(4, "TH reads AcceptedCommandList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Binding::Id, Binding::Attributes::AcceptedCommandList::Id, true, - chip::NullOptional); - } - case 5: { - LogStep(5, "TH reads GeneratedCommandList from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), Binding::Id, Binding::Attributes::GeneratedCommandList::Id, true, - chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_1_1Suite : public TestCommand -{ -public: - Test_TC_CC_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_1_1", 47, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CC_1_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("clusterRevision", value, 5U)); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 1UL)); - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 2UL)); - } - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 4UL)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 8UL)); - } - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); - VerifyOrReturn(CheckConstraintHasMasksSet("value", value, 16UL)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 15UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 16385UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 16394UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); - } - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); + VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); } break; case 13: 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(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 14: 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(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65534U)); } break; case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 7UL)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16384UL)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); } break; case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + uint32_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16386UL)); + FeatureMapValue = value; } break; case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16387UL)); + VerifyOrReturn(CheckValue("colorCapabilities", value, FeatureMapValue)); + VerifyOrReturn(CheckConstraintType("value", "bitmap16", "bitmap16")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 31U)); } break; case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16388UL)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16389UL)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16390UL)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16395UL)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 16396UL)); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 6U)); } break; case 25: 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, 16397UL)); - } + shouldContinue = true; break; case 26: 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, 16400UL)); - } + shouldContinue = true; break; case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } + shouldContinue = true; break; case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); - } + shouldContinue = true; break; case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } + shouldContinue = true; break; case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } + shouldContinue = true; break; case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); - } + shouldContinue = true; break; case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 5UL)); - } + shouldContinue = true; break; case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 6UL)); - } + shouldContinue = true; break; case 34: 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, 7UL)); - } + shouldContinue = true; break; case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 8UL)); - } + shouldContinue = true; break; case 36: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 37: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 38: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 39: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 40: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 41: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 42: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 43: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 9UL)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 37: + case 44: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 10UL)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 38: + case 45: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 64UL)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 39: + case 46: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 65UL)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 40: + case 47: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 66UL)); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; - case 41: + case 48: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 67UL)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 42: + case 49: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 68UL)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 43: + case 50: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 71UL)); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; - case 44: + case 51: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 75UL)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 45: + case 52: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + uint16_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 76UL)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); } break; - case 46: + case 53: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::Nullable value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; default: @@ -11086,288 +10759,439 @@ class Test_TC_CC_1_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ClusterRevision::Id, - true, chip::NullOptional); - } - case 2: { - LogStep(2, "Read the global attribute: FeatureMap"); - VerifyOrDo(!ShouldSkip("( !CC.S.F00 && !CC.S.F01 && !CC.S.F02 && !CC.S.F03 && !CC.S.F04 )"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::FeatureMap::Id, true, + LogStep(1, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } - case 3: { - LogStep(3, "Given CC.S.F00(HS) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::FeatureMap::Id, true, - chip::NullOptional); + case 2: { + LogStep(2, "TH reads CurrentSaturation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, + true, chip::NullOptional); + } + case 3: { + LogStep(3, "TH reads RemainingTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::RemainingTime::Id, + true, chip::NullOptional); } case 4: { - LogStep(4, "Given CC.S.F01(EHue) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("CC.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::FeatureMap::Id, true, + LogStep(4, "TH reads CurrentX attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, chip::NullOptional); } case 5: { - LogStep(5, "Given CC.S.F02(CL) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("CC.S.F02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::FeatureMap::Id, true, + LogStep(5, "TH reads CurrentY attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, chip::NullOptional); } case 6: { - LogStep(6, "Given CC.S.F03(XY) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("CC.S.F03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::FeatureMap::Id, true, - chip::NullOptional); + LogStep(6, "TH reads DriftCompensation attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::DriftCompensation::Id, + true, chip::NullOptional); } case 7: { - LogStep(7, "Given CC.S.F04(CT) ensure featuremap has the correct bit set"); - VerifyOrDo(!ShouldSkip("CC.S.F04"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::FeatureMap::Id, true, - chip::NullOptional); + LogStep(7, "TH reads CompensationText attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CompensationText::Id, + true, chip::NullOptional); } case 8: { - LogStep(8, "Read the global attribute: AttributeList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); + LogStep(8, "TH reads ColorTemperatureMireds attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::ColorTemperatureMireds::Id, true, chip::NullOptional); } case 9: { - LogStep(9, "Read the optional attribute(CurrentHue) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); + LogStep(9, "TH reads ColorMode attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, + chip::NullOptional); } case 10: { - LogStep(10, "Read the optional attribute(CurrentSaturation) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); + LogStep(10, "TH reads Options attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, true, + chip::NullOptional); } case 11: { - LogStep(11, "Read the optional attribute(RemainingTime) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + LogStep(11, "TH reads EnhancedCurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "Read the optional attribute(CurrentX) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + LogStep(12, "TH reads EnhancedColorMode attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedColorMode::Id, true, chip::NullOptional); } case 13: { - LogStep(13, "Read the optional attribute(CurrentY) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + LogStep(13, "TH reads ColorLoopActive attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, true, chip::NullOptional); } case 14: { - LogStep(14, "Read the optional attribute(DriftCompensation) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + LogStep(14, "TH reads ColorLoopDirection attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, true, chip::NullOptional); } case 15: { - LogStep(15, "Read the optional attribute(CompensationText) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + LogStep(15, "TH reads ColorLoopTime attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopTime::Id, true, chip::NullOptional); } case 16: { - LogStep(16, "Read the optional attribute(ColorTemperatureMireds) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); + LogStep(16, "TH reads ColorLoopStartEnhancedHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); } case 17: { - LogStep(17, "Read the optional attribute(EnhancedCurrentHue) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); + LogStep(17, "TH reads ColorLoopStoredEnhancedHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); } case 18: { - LogStep(18, "Read the optional attribute(ColorLoopActive) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); + LogStep(18, "Saving for comparision in step 19 reads FeatureMap attribute from DUT"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::FeatureMap::Id, true, + chip::NullOptional); } case 19: { - LogStep(19, "Read the optional attribute(ColorLoopDirection) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + LogStep(19, "TH reads ColorCapabilities attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A400a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorCapabilities::Id, true, chip::NullOptional); } case 20: { - LogStep(20, "Read the optional attribute(ColorLoopTime) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A4004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); + LogStep(20, "TH reads ColorTempPhysicalMinMireds attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A400b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::ColorTempPhysicalMinMireds::Id, true, chip::NullOptional); } case 21: { - LogStep(21, "Read the optional attribute(ColorLoopStartEnhancedHue) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); + LogStep(21, "TH reads ColorTempPhysicalMaxMireds attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A400c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id, true, chip::NullOptional); } case 22: { - LogStep(22, "Read the optional attribute(ColorLoopStoredEnhancedHue) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); + LogStep(22, "TH reads CoupleColorTempToLevelMinMireds attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A400d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::CoupleColorTempToLevelMinMireds::Id, true, chip::NullOptional); } case 23: { - LogStep(23, "Read the optional attribute(ColorTempPhysicalMinMireds) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A400b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); + LogStep(23, "TH reads StartUpColorTemperatureMireds attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A4010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::StartUpColorTemperatureMireds::Id, true, chip::NullOptional); } case 24: { - LogStep(24, "Read the optional attribute(ColorTempPhysicalMaxMireds) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A400c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, + LogStep(24, "TH reads NumberOfPrimaries attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::NumberOfPrimaries::Id, true, chip::NullOptional); } case 25: { - LogStep(25, "Read the optional attribute(CoupleColorTempToLevelMinMireds) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A400d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); + LogStep(25, + "TH reads Primary1X attribute from DUT and Verify that the DUT response contains an uint16 [Min:0 Max:0xfeff] " + "if NumberOfPrimaries is 1 or more"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 26: { - LogStep(26, "Read the optional attribute(StartUpColorTemperatureMireds) in AttributeList"); - VerifyOrDo(!ShouldSkip("CC.S.A4010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::AttributeList::Id, - true, chip::NullOptional); + LogStep(26, + "TH reads Primary1Y attribute from DUT and Verify that the DUT response contains an uint16 [Min:0 Max:0xfeff] " + "if NumberOfPrimaries is 1 or more"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 27: { - LogStep(27, "Read the optional command(MoveToHue) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + LogStep(27, + "TH reads Primary1Intensity attribute from DUT and Verify that the DUT response contains an uint8 if " + "NumberOfPrimaries is 1 or more"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 28: { - LogStep(28, "Read the optional command(MoveHue) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + LogStep(28, + "TH reads Primary2X attribute from DUT and Verify that the DUT response contains an uint16 [Min:0 Max:0xfeff] " + "if NumberOfPrimaries is 2 or more"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 29: { - LogStep(29, "Read the optional command(StepHue) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CC.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + LogStep(29, + "TH reads Primary2Y attribute from DUT and Verify that the DUT response contains an uint16 [Min:0 Max:0xfeff] " + "if NumberOfPrimaries is 2 or more"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 30: { - LogStep(30, "Read the optional command(MoveToSaturation) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CC.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + LogStep(30, + "TH reads Primary2Intensity attribute from DUT and Verify that the DUT response contains an uint8 if " + "NumberOfPrimaries is 2 or more"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 31: { - LogStep(31, "Read the optional command(MoveSaturation) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CC.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + LogStep(31, + "TH reads Primary3X attribute from DUT and Verify that the DUT response contains an uint16 [Min:0 Max:0xfeff] " + "if NumberOfPrimaries is 3 or more"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 32: { - LogStep(32, "Read the optional command(StepSaturation) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CC.S.C05.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + LogStep(32, + "TH reads Primary3Y attribute from DUT and Verify that the DUT response contains an uint16 [Min:0 Max:0xfeff] " + "if NumberOfPrimaries is 3 or more"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A001a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 33: { - LogStep(33, "Read the optional command(MoveToHueAndSaturation) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CC.S.C06.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + LogStep(33, + "TH reads Primary3Intensity attribute from DUT and Verify that the DUT response contains an uint8 if " + "NumberOfPrimaries is 3 or more"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A001b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 34: { - LogStep(34, "Read the optional command(MoveToColor) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CC.S.C07.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + LogStep(34, + "TH reads Primary4X attribute from DUT Verify that the DUT response contains an uint16 [Min:0 Max:0xfeff] if " + "NumberOfPrimaries is 4 or more"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 35: { - LogStep(35, "Read the optional command(MoveColor) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CC.S.C08.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + LogStep(35, + "TH reads Primary4Y attribute from DUT and Verify that the DUT response contains an uint16 [Min:0 Max:0xfeff] " + "if NumberOfPrimaries is 4 or more"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 36: { - LogStep(36, "Read the optional command(StepColor) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CC.S.C09.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + LogStep(36, + "TH reads Primary4Intensity attribute from DUT and Verify that the DUT response contains an uint8 if " + "NumberOfPrimaries is 4 or more"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0022"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 37: { - LogStep(37, "Read the optional command(MoveToColorTemperature) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CC.S.C0a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + LogStep(37, + "TH reads Primary5X attribute from DUT and Verify that the DUT response contains an uint16 [Min:0 Max:0xfeff] " + "if NumberOfPrimaries is 5 or more"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0024"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 38: { - LogStep(38, "Read the optional command(EnhancedMoveToHue) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CC.S.C40.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + LogStep(38, + "TH reads Primary5Y attribute from DUT and Verify that the DUT response contains an uint16 [Min:0 Max:0xfeff] " + "if NumberOfPrimaries is 5 or more"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0025"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 39: { - LogStep(39, "Read the optional command(EnhancedMoveHue) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CC.S.C41.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + LogStep(39, + "TH reads Primary5Intensity attribute from DUT and Verify that the DUT response contains an uint8 if " + "NumberOfPrimaries is 5 or more"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0026"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 40: { - LogStep(40, "Read the optional command(EnhancedStepHue) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CC.S.C42.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + LogStep(40, + "TH reads Primary6X attribute from DUT and Verify that the DUT response contains an uint16 [Min:0 Max:0xfeff] " + "if NumberOfPrimaries is 6 or more"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0028"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 41: { - LogStep(41, "Read the optional command(EnhancedMoveToHueAndSaturation) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CC.S.C43.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + LogStep(41, + "TH reads Primary6Y attribute from DUT and Verify that the DUT response contains an uint16 [Min:0 Max:0xfeff] " + "if NumberOfPrimaries is 6 or more"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0029"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 42: { - LogStep(42, "Read the optional command(ColorLoopSet) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CC.S.C44.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + LogStep(42, + "TH reads Primary6Intensity attribute from DUT and Verify that the DUT response contains an uint8 if " + "NumberOfPrimaries is 6 or more"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A002a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); } case 43: { - LogStep(43, "Read the optional command(StopMoveStep) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CC.S.C47.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + LogStep(43, "TH reads WhitePointX attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::WhitePointX::Id, true, + chip::NullOptional); } case 44: { - LogStep(44, "Read the optional command(MoveColorTemperature) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CC.S.C4b.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + LogStep(44, "TH reads WhitePointY attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::WhitePointY::Id, true, + chip::NullOptional); } case 45: { - LogStep(45, "Read the optional command(StepColorTemperature) in AcceptedCommandList"); - VerifyOrDo(!ShouldSkip("CC.S.C4c.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + LogStep(45, "TH reads ColorPointRX attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0032"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointRX::Id, true, + chip::NullOptional); } case 46: { - LogStep(46, "Read the global attribute: GeneratedCommandList"); + LogStep(46, "TH reads ColorPointRY attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointRY::Id, true, + chip::NullOptional); + } + case 47: { + LogStep(47, "TH reads ColorPointRIntensity attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0034"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + ColorControl::Attributes::ColorPointRIntensity::Id, true, chip::NullOptional); + } + case 48: { + LogStep(48, "TH reads ColorPointGX attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0036"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointGX::Id, true, + chip::NullOptional); + } + case 49: { + LogStep(49, "TH reads ColorPointGY attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0037"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointGY::Id, true, + chip::NullOptional); + } + case 50: { + LogStep(50, "TH reads ColorPointGIntensity attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A0038"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::ColorPointGIntensity::Id, true, chip::NullOptional); + } + case 51: { + LogStep(51, "TH reads ColorPointBX attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A003a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointBX::Id, true, + chip::NullOptional); + } + case 52: { + LogStep(52, "TH reads ColorPointBY attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A003b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointBY::Id, true, + chip::NullOptional); + } + case 53: { + LogStep(53, "TH reads ColorPointBIntensity attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.A003c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, + ColorControl::Attributes::ColorPointBIntensity::Id, true, chip::NullOptional); } } return CHIP_NO_ERROR; } }; -class Test_TC_CC_2_1Suite : public TestCommand +class Test_TC_CC_3_2Suite : public TestCommand { public: - Test_TC_CC_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_2_1", 54, credsIssuerConfig) + Test_TC_CC_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_3_2", 31, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -11375,7 +11199,7 @@ class Test_TC_CC_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CC_2_1Suite() {} + ~Test_TC_CC_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -11388,8 +11212,6 @@ class Test_TC_CC_2_1Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mTimeout; - uint32_t FeatureMapValue; - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -11408,240 +11230,125 @@ class Test_TC_CC_2_1Suite : public TestCommand break; case 1: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65534U)); - } break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } + shouldContinue = true; break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } break; case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4U)); - } + shouldContinue = true; break; case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::CharSpan value; + uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 254)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 215U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } + shouldContinue = true; break; case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 38U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 52U)); } break; case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "bitmap8", "bitmap8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 4U)); - } + shouldContinue = true; break; case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } break; case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "enum8", "enum8")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 80U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 110U)); } break; case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } + shouldContinue = true; break; case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 80U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 110U)); } break; case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65534U)); - } break; case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } + shouldContinue = true; break; case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); - } break; case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint32_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - FeatureMapValue = value; - } + shouldContinue = true; break; case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorCapabilities", value, FeatureMapValue)); - VerifyOrReturn(CheckConstraintType("value", "bitmap16", "bitmap16")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 31U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 8U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 12U)); } break; case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } + shouldContinue = true; break; case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 183U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 247U)); } break; case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } + shouldContinue = true; break; case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } break; case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable value; + uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 6U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 140U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 190U)); } break; case 25: @@ -11649,181 +11356,43 @@ class Test_TC_CC_2_1Suite : public TestCommand shouldContinue = true; break; case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - 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)); - shouldContinue = true; - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 34: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 35: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 37: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 38: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 40: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 41: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 42: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 43: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } - break; - case 44: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } - break; - case 45: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } - break; - case 46: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } - break; - case 47: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } - break; - case 48: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } - break; - case 49: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 140U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 190U)); } break; - case 50: + case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable value; + uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); + VerifyOrReturn(CheckValue("colorMode", value, 0U)); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); } break; - case 51: + case 28: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint16_t value; + uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + VerifyOrReturn(CheckValue("enhancedColorMode", value, 0U)); VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); } break; - case 52: + case 29: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint16_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 65279U)); - } break; - case 53: + case 30: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::Nullable value; + bool value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int8u", "int8u")); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); + VerifyOrReturn(CheckValue("onOff", value, 0)); } break; default: @@ -11849,439 +11418,276 @@ class Test_TC_CC_2_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); + LogStep(1, "TH writes 0 to the Options attribute"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + uint8_t value; + value = 0U; + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, + chip::NullOptional, chip::NullOptional); } case 2: { - LogStep(2, "TH reads CurrentSaturation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentSaturation::Id, - true, chip::NullOptional); + LogStep(2, "TH sends On command to DUT"); + VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::On::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional + + ); } case 3: { - LogStep(3, "TH reads RemainingTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::RemainingTime::Id, - true, chip::NullOptional); + LogStep(3, + "TH sends MoveToHue command to DUT with Hue=200, Direction=0x00 (shortest distance) and TransitionTime=0 " + "(immediately)"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; + value.hue = 200U; + value.direction = static_cast(0); + value.transitionTime = 0U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id, value, + chip::NullOptional + + ); } case 4: { - LogStep(4, "TH reads CurrentX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentX::Id, true, - chip::NullOptional); + LogStep(4, "Wait 100ms"); + VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); } case 5: { - LogStep(5, "TH reads CurrentY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentY::Id, true, - chip::NullOptional); + LogStep(5, "TH sends MoveHue command to DUT with MoveMode=0x01 (up) and Rate=5 (units/s)"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::ColorControl::Commands::MoveHue::Type value; + value.moveMode = static_cast(1); + value.rate = 5U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id, value, + chip::NullOptional + + ); } case 6: { - LogStep(6, "TH reads DriftCompensation attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::DriftCompensation::Id, - true, chip::NullOptional); + LogStep(6, "Wait 10s"); + VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); } case 7: { - LogStep(7, "TH reads CompensationText attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CompensationText::Id, - true, chip::NullOptional); + LogStep(7, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); } case 8: { - LogStep(8, "TH reads ColorTemperatureMireds attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTemperatureMireds::Id, true, chip::NullOptional); + LogStep(8, "Wait 10s"); + VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); } case 9: { - LogStep(9, "TH reads ColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, + LogStep(9, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, chip::NullOptional); } case 10: { - LogStep(10, "TH reads Options attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, true, - chip::NullOptional); + LogStep(10, "Wait 10s"); + VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); } case 11: { - LogStep(11, "TH reads EnhancedCurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedCurrentHue::Id, - true, chip::NullOptional); + LogStep(11, "TH sends MoveHue command to DUT with MoveMode=0x00 (stop) and Rate=5 (units/s)"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::ColorControl::Commands::MoveHue::Type value; + value.moveMode = static_cast(0); + value.rate = 5U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id, value, + chip::NullOptional + + ); } case 12: { - LogStep(12, "TH reads EnhancedColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedColorMode::Id, - true, chip::NullOptional); + LogStep(12, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); } case 13: { - LogStep(13, "TH reads ColorLoopActive attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopActive::Id, - true, chip::NullOptional); + LogStep(13, "Wait 2s"); + VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 2000UL; + return WaitForMs(kIdentityAlpha, value); } case 14: { - LogStep(14, "TH reads ColorLoopDirection attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopDirection::Id, - true, chip::NullOptional); + LogStep(14, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); } case 15: { - LogStep(15, "TH reads ColorLoopTime attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorLoopTime::Id, - true, chip::NullOptional); + LogStep(15, + "TH sends MoveToHue command to DUT with Hue=60, Direction=0x00 (shortest distance) and TransitionTime=0 " + "(immediately)"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; + value.hue = 60U; + value.direction = static_cast(0); + value.transitionTime = 0U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id, value, + chip::NullOptional + + ); } case 16: { - LogStep(16, "TH reads ColorLoopStartEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStartEnhancedHue::Id, true, chip::NullOptional); + LogStep(16, "Wait 100ms"); + VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 100UL; + return WaitForMs(kIdentityAlpha, value); } case 17: { - LogStep(17, "TH reads ColorLoopStoredEnhancedHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorLoopStoredEnhancedHue::Id, true, chip::NullOptional); - } - case 18: { - LogStep(18, "Saving for comparision in step 19 reads FeatureMap attribute from DUT"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 19: { - LogStep(19, "TH reads ColorCapabilities attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A400a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorCapabilities::Id, - true, chip::NullOptional); + LogStep(17, "TH sends MoveHue command to DUT with MoveMode=0x03 (down) and Rate=5 (units/s)"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::ColorControl::Commands::MoveHue::Type value; + value.moveMode = static_cast(3); + value.rate = 5U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id, value, + chip::NullOptional + + ); + } + case 18: { + LogStep(18, "Wait 10s"); + VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); + } + case 19: { + LogStep(19, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); } case 20: { - LogStep(20, "TH reads ColorTempPhysicalMinMireds attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A400b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTempPhysicalMinMireds::Id, true, chip::NullOptional); + LogStep(20, "Wait 10s"); + VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); } case 21: { - LogStep(21, "TH reads ColorTempPhysicalMaxMireds attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A400c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorTempPhysicalMaxMireds::Id, true, chip::NullOptional); + LogStep(21, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); } case 22: { - LogStep(22, "TH reads CoupleColorTempToLevelMinMireds attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A400d"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::CoupleColorTempToLevelMinMireds::Id, true, chip::NullOptional); + LogStep(22, "Wait 10s"); + VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 10000UL; + return WaitForMs(kIdentityAlpha, value); } case 23: { - LogStep(23, "TH reads StartUpColorTemperatureMireds attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A4010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::StartUpColorTemperatureMireds::Id, true, chip::NullOptional); + LogStep(23, "TH sends MoveHue command to DUT with MoveMode=0x00 (stop) and Rate=5 (units/s)"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::ColorControl::Commands::MoveHue::Type value; + value.moveMode = static_cast(0); + value.rate = 5U; + value.optionsMask = 0U; + value.optionsOverride = 0U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id, value, + chip::NullOptional + + ); } case 24: { - LogStep(24, "TH reads NumberOfPrimaries attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0010"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::NumberOfPrimaries::Id, - true, chip::NullOptional); + LogStep(24, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); } case 25: { - LogStep(25, - "TH reads Primary1X attribute from DUT and Verify that the DUT response contains an uint16 [Min:0 Max:0xfeff] " - "if NumberOfPrimaries is 1 or more"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(25, "Wait 2s"); + VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 2000UL; + return WaitForMs(kIdentityAlpha, value); } case 26: { - LogStep(26, - "TH reads Primary1Y attribute from DUT and Verify that the DUT response contains an uint16 [Min:0 Max:0xfeff] " - "if NumberOfPrimaries is 1 or more"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0012"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(26, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); } case 27: { - LogStep(27, - "TH reads Primary1Intensity attribute from DUT and Verify that the DUT response contains an uint8 if " - "NumberOfPrimaries is 1 or more"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0013"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(27, "TH reads ColorMode attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, + chip::NullOptional); } case 28: { - LogStep(28, - "TH reads Primary2X attribute from DUT and Verify that the DUT response contains an uint16 [Min:0 Max:0xfeff] " - "if NumberOfPrimaries is 2 or more"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0015"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(28, "TH reads EnhancedColorMode attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedColorMode::Id, + true, chip::NullOptional); } case 29: { - LogStep(29, - "TH reads Primary2Y attribute from DUT and Verify that the DUT response contains an uint16 [Min:0 Max:0xfeff] " - "if NumberOfPrimaries is 2 or more"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0016"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(29, "Turn off light that we turned on"); + VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + chip::app::Clusters::OnOff::Commands::Off::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional + + ); } case 30: { - LogStep(30, - "TH reads Primary2Intensity attribute from DUT and Verify that the DUT response contains an uint8 if " - "NumberOfPrimaries is 2 or more"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0017"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 31: { - LogStep(31, - "TH reads Primary3X attribute from DUT and Verify that the DUT response contains an uint16 [Min:0 Max:0xfeff] " - "if NumberOfPrimaries is 3 or more"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 32: { - LogStep(32, - "TH reads Primary3Y attribute from DUT and Verify that the DUT response contains an uint16 [Min:0 Max:0xfeff] " - "if NumberOfPrimaries is 3 or more"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A001a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 33: { - LogStep(33, - "TH reads Primary3Intensity attribute from DUT and Verify that the DUT response contains an uint8 if " - "NumberOfPrimaries is 3 or more"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A001b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 34: { - LogStep(34, - "TH reads Primary4X attribute from DUT Verify that the DUT response contains an uint16 [Min:0 Max:0xfeff] if " - "NumberOfPrimaries is 4 or more"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0020"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 35: { - LogStep(35, - "TH reads Primary4Y attribute from DUT and Verify that the DUT response contains an uint16 [Min:0 Max:0xfeff] " - "if NumberOfPrimaries is 4 or more"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0021"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 36: { - LogStep(36, - "TH reads Primary4Intensity attribute from DUT and Verify that the DUT response contains an uint8 if " - "NumberOfPrimaries is 4 or more"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0022"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 37: { - LogStep(37, - "TH reads Primary5X attribute from DUT and Verify that the DUT response contains an uint16 [Min:0 Max:0xfeff] " - "if NumberOfPrimaries is 5 or more"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0024"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 38: { - LogStep(38, - "TH reads Primary5Y attribute from DUT and Verify that the DUT response contains an uint16 [Min:0 Max:0xfeff] " - "if NumberOfPrimaries is 5 or more"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0025"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 39: { - LogStep(39, - "TH reads Primary5Intensity attribute from DUT and Verify that the DUT response contains an uint8 if " - "NumberOfPrimaries is 5 or more"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0026"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 40: { - LogStep(40, - "TH reads Primary6X attribute from DUT and Verify that the DUT response contains an uint16 [Min:0 Max:0xfeff] " - "if NumberOfPrimaries is 6 or more"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0028"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 41: { - LogStep(41, - "TH reads Primary6Y attribute from DUT and Verify that the DUT response contains an uint16 [Min:0 Max:0xfeff] " - "if NumberOfPrimaries is 6 or more"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A0029"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 42: { - LogStep(42, - "TH reads Primary6Intensity attribute from DUT and Verify that the DUT response contains an uint8 if " - "NumberOfPrimaries is 6 or more"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && CC.S.A002a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 43: { - LogStep(43, "TH reads WhitePointX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::WhitePointX::Id, true, - chip::NullOptional); - } - case 44: { - LogStep(44, "TH reads WhitePointY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::WhitePointY::Id, true, - chip::NullOptional); - } - case 45: { - LogStep(45, "TH reads ColorPointRX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0032"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointRX::Id, true, - chip::NullOptional); - } - case 46: { - LogStep(46, "TH reads ColorPointRY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointRY::Id, true, - chip::NullOptional); - } - case 47: { - LogStep(47, "TH reads ColorPointRIntensity attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0034"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorPointRIntensity::Id, true, chip::NullOptional); - } - case 48: { - LogStep(48, "TH reads ColorPointGX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0036"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointGX::Id, true, - chip::NullOptional); - } - case 49: { - LogStep(49, "TH reads ColorPointGY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0037"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointGY::Id, true, - chip::NullOptional); - } - case 50: { - LogStep(50, "TH reads ColorPointGIntensity attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0038"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorPointGIntensity::Id, true, chip::NullOptional); - } - case 51: { - LogStep(51, "TH reads ColorPointBX attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A003a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointBX::Id, true, - chip::NullOptional); - } - case 52: { - LogStep(52, "TH reads ColorPointBY attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A003b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorPointBY::Id, true, - chip::NullOptional); - } - case 53: { - LogStep(53, "TH reads ColorPointBIntensity attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A003c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, - ColorControl::Attributes::ColorPointBIntensity::Id, true, chip::NullOptional); + LogStep(30, "Check on/off attribute value is false after off command"); + VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } } return CHIP_NO_ERROR; } }; -class Test_TC_CC_3_2Suite : public TestCommand +class Test_TC_CC_3_3Suite : public TestCommand { public: - Test_TC_CC_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_3_2", 31, credsIssuerConfig) + Test_TC_CC_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_3_3", 25, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -12289,7 +11695,7 @@ class Test_TC_CC_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CC_3_2Suite() {} + ~Test_TC_CC_3_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -12343,8 +11749,8 @@ class Test_TC_CC_3_2Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 215U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 195U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); } break; case 8: @@ -12356,8 +11762,8 @@ class Test_TC_CC_3_2Suite : public TestCommand { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 38U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 52U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 4U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 6U)); } break; case 10: @@ -12365,96 +11771,64 @@ class Test_TC_CC_3_2Suite : public TestCommand shouldContinue = true; break; case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 80U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 110U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 4U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 6U)); } break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 80U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 110U)); - } 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)); - shouldContinue = true; - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 8U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 12U)); - } - break; - case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 21: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 183U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 247U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 17U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 23U)); } break; - case 22: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 140U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 190U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 208U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; - case 25: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 26: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 140U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 190U)); + VerifyOrReturn(CheckConstraintMinValue("value", value, 208U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); } break; - case 27: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -12464,7 +11838,7 @@ class Test_TC_CC_3_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); } break; - case 28: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -12474,10 +11848,10 @@ class Test_TC_CC_3_2Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); } break; - case 29: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 30: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { bool value; @@ -12551,15 +11925,16 @@ class Test_TC_CC_3_2Suite : public TestCommand return WaitForMs(kIdentityAlpha, value); } case 5: { - LogStep(5, "TH sends MoveHue command to DUT with MoveMode=0x01 (up) and Rate=5 (units/s)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "TH sends StepHue command to DUT with StepMode=0x01 (up), StepSize=60 and TransitionTime=200 (20s)"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveHue::Type value; - value.moveMode = static_cast(1); - value.rate = 5U; + chip::app::Clusters::ColorControl::Commands::StepHue::Type value; + value.stepMode = static_cast(1); + value.stepSize = 60U; + value.transitionTime = 200U; value.optionsMask = 0U; value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id, value, + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepHue::Id, value, chip::NullOptional ); @@ -12593,507 +11968,42 @@ class Test_TC_CC_3_2Suite : public TestCommand chip::NullOptional); } case 10: { - LogStep(10, "Wait 10s"); + LogStep(10, "Wait 5s"); VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; + value.ms = 5000UL; return WaitForMs(kIdentityAlpha, value); } case 11: { - LogStep(11, "TH sends MoveHue command to DUT with MoveMode=0x00 (stop) and Rate=5 (units/s)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "TH reads CurrentHue attribute from DUT"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, + chip::NullOptional); + } + case 12: { + LogStep(12, + "TH sends MoveToHue command to DUT with Hue=50, Direction=0x00 (shortest distance) and TransitionTime=0 " + "(immediately)"); + VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveHue::Type value; - value.moveMode = static_cast(0); - value.rate = 5U; + chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; + value.hue = 50U; + value.direction = static_cast(0); + value.transitionTime = 0U; value.optionsMask = 0U; value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id, value, + return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id, value, chip::NullOptional ); } - case 12: { - LogStep(12, "TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } case 13: { - LogStep(13, "Wait 2s"); + LogStep(13, "Wait 100ms"); VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 2000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 14: { - LogStep(14, "TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 15: { - LogStep(15, - "TH sends MoveToHue command to DUT with Hue=60, Direction=0x00 (shortest distance) and TransitionTime=0 " - "(immediately)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; - value.hue = 60U; - value.direction = static_cast(0); - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id, value, - chip::NullOptional - - ); - } - case 16: { - LogStep(16, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 17: { - LogStep(17, "TH sends MoveHue command to DUT with MoveMode=0x03 (down) and Rate=5 (units/s)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveHue::Type value; - value.moveMode = static_cast(3); - value.rate = 5U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id, value, - chip::NullOptional - - ); - } - case 18: { - LogStep(18, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 19: { - LogStep(19, "TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 20: { - LogStep(20, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 21: { - LogStep(21, "TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 22: { - LogStep(22, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 23: { - LogStep(23, "TH sends MoveHue command to DUT with MoveMode=0x00 (stop) and Rate=5 (units/s)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveHue::Type value; - value.moveMode = static_cast(0); - value.rate = 5U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveHue::Id, value, - chip::NullOptional - - ); - } - case 24: { - LogStep(24, "TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 25: { - LogStep(25, "Wait 2s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 2000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 26: { - LogStep(26, "TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 27: { - LogStep(27, "TH reads ColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::ColorMode::Id, true, - chip::NullOptional); - } - case 28: { - LogStep(28, "TH reads EnhancedColorMode attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A4001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedColorMode::Id, - true, chip::NullOptional); - } - case 29: { - LogStep(29, "Turn off light that we turned on"); - VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::Off::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional - - ); - } - case 30: { - LogStep(30, "Check on/off attribute value is false after off command"); - VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CC_3_3Suite : public TestCommand -{ -public: - Test_TC_CC_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_3_3", 25, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CC_3_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - 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)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 195U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 254U)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 4U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 6U)); - } - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 4U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 6U)); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - 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)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 17U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 23U)); - } - 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)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 208U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } - 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)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinValue("value", value, 208U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); - } - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("colorMode", value, 0U)); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 2U)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - uint8_t value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("enhancedColorMode", value, 0U)); - VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); - } - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - bool value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("onOff", value, 0)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "TH writes 0 to the Options attribute"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - uint8_t value; - value = 0U; - return WriteAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::Options::Id, value, - chip::NullOptional, chip::NullOptional); - } - case 2: { - LogStep(2, "TH sends On command to DUT"); - VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OnOff::Commands::On::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::On::Id, value, chip::NullOptional - - ); - } - case 3: { - LogStep(3, - "TH sends MoveToHue command to DUT with Hue=200, Direction=0x00 (shortest distance) and TransitionTime=0 " - "(immediately)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; - value.hue = 200U; - value.direction = static_cast(0); - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id, value, - chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "TH sends StepHue command to DUT with StepMode=0x01 (up), StepSize=60 and TransitionTime=200 (20s)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::StepHue::Type value; - value.stepMode = static_cast(1); - value.stepSize = 60U; - value.transitionTime = 200U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::StepHue::Id, value, - chip::NullOptional - - ); - } - case 6: { - LogStep(6, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 7: { - LogStep(7, "TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 8: { - LogStep(8, "Wait 10s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 10000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 9: { - LogStep(9, "TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 10: { - LogStep(10, "Wait 5s"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 11: { - LogStep(11, "TH reads CurrentHue attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CurrentHue::Id, true, - chip::NullOptional); - } - case 12: { - LogStep(12, - "TH sends MoveToHue command to DUT with Hue=50, Direction=0x00 (shortest distance) and TransitionTime=0 " - "(immediately)"); - VerifyOrDo(!ShouldSkip("CC.S.F00 && CC.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ColorControl::Commands::MoveToHue::Type value; - value.hue = 50U; - value.direction = static_cast(0); - value.transitionTime = 0U; - value.optionsMask = 0U; - value.optionsOverride = 0U; - return SendCommand(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Commands::MoveToHue::Id, value, - chip::NullOptional - - ); - } - case 13: { - LogStep(13, "Wait 100ms"); - VerifyOrDo(!ShouldSkip("CC.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 100UL; + value.ms = 100UL; return WaitForMs(kIdentityAlpha, value); } case 14: { @@ -14874,7 +13784,7 @@ class Test_TC_CC_4_4Suite : public TestCommand class Test_TC_CC_5_1Suite : public TestCommand { public: - Test_TC_CC_5_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_5_1", 59, credsIssuerConfig) + Test_TC_CC_5_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CC_5_1", 61, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -15259,6 +14169,17 @@ class Test_TC_CC_5_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 3U)); } break; + case 59: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 60: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + bool value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("onOff", value, 0)); + } + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -15787,6 +14708,20 @@ class Test_TC_CC_5_1Suite : public TestCommand return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::EnhancedColorMode::Id, true, chip::NullOptional); } + case 59: { + LogStep(59, "Turn off light that we turned on"); + VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::OnOff::Commands::Off::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Commands::Off::Id, value, chip::NullOptional + + ); + } + case 60: { + LogStep(60, "Check on/off attribute value is false after off command"); + VerifyOrDo(!ShouldSkip("OO.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); + } } return CHIP_NO_ERROR; } @@ -26873,7 +25808,7 @@ class Test_TC_LVL_2_2Suite : public TestCommand class Test_TC_LVL_3_1Suite : public TestCommand { public: - Test_TC_LVL_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_3_1", 46, credsIssuerConfig) + Test_TC_LVL_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LVL_3_1", 47, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -26934,6 +25869,9 @@ class Test_TC_LVL_3_1Suite : public TestCommand 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)); { bool value; @@ -26941,7 +25879,7 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("onOff", value, 1)); } break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -26950,13 +25888,13 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 50U)); } 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)); { chip::app::DataModel::Nullable value; @@ -26965,14 +25903,14 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 50U)); } break; - case 12: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 13: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 14: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -26981,11 +25919,11 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 115U)); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -26994,11 +25932,11 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 173U)); } break; - case 17: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 18: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -27007,11 +25945,11 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckConstraintMaxValue("value", value, 200U)); } break; - case 19: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 20: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -27020,7 +25958,7 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 200U)); } break; - case 21: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -27029,10 +25967,10 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 200U)); } break; - case 22: + case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 23: + case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::BitMask value; @@ -27040,13 +25978,13 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("options", value, 0U)); } 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)); { chip::app::DataModel::Nullable value; @@ -27055,13 +25993,13 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 100U)); } 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)); { chip::app::DataModel::Nullable value; @@ -27070,10 +26008,10 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 100U)); } break; - case 30: + case 31: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 31: + case 32: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -27082,10 +26020,10 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 100U)); } break; - case 32: + case 33: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 33: + case 34: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -27094,10 +26032,10 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 160U)); } break; - case 34: + case 35: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 35: + case 36: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::BitMask value; @@ -27105,13 +26043,13 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("options", value, 1U)); } break; - case 36: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 37: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 38: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 39: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -27120,13 +26058,13 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 100U)); } break; - case 39: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; case 40: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 41: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 42: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -27135,10 +26073,10 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 120U)); } break; - case 42: + case 43: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 43: + case 44: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -27147,10 +26085,10 @@ class Test_TC_LVL_3_1Suite : public TestCommand VerifyOrReturn(CheckValue("currentLevel.Value()", value.Value(), 120U)); } break; - case 44: + case 45: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 45: + case 46: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::Nullable value; @@ -27214,7 +26152,16 @@ class Test_TC_LVL_3_1Suite : public TestCommand chip::NullOptional, chip::NullOptional); } case 5: { - LogStep(5, "TH sends Off command to DUT"); + LogStep(5, "TH writes NULL to the OnLevel attribute"); + VerifyOrDo(!ShouldSkip("LVL.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::Nullable value; + value.SetNull(); + return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::OnLevel::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 6: { + LogStep(6, "TH sends Off command to DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C04.Rsp && OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; @@ -27222,8 +26169,8 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 6: { - LogStep(6, "TH sends a MoveToLevelWithOnOff command to DUT, with Level =50 and TransitionTime =0 (immediate)"); + case 7: { + LogStep(7, "TH sends a MoveToLevelWithOnOff command to DUT, with Level =50 and TransitionTime =0 (immediate)"); VerifyOrDo(!ShouldSkip("LVL.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevelWithOnOff::Type value; @@ -27237,19 +26184,19 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 7: { - LogStep(7, "TH reads OnOff attribute (On/Off cluster) from DUT"); + case 8: { + LogStep(8, "TH reads OnOff attribute (On/Off cluster) from DUT"); VerifyOrDo(!ShouldSkip("OO.S.A0000 && LVL.S.C04.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), OnOff::Id, OnOff::Attributes::OnOff::Id, true, chip::NullOptional); } - case 8: { - LogStep(8, "TH reads CurrentLevel attribute from DUT"); + case 9: { + LogStep(9, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C04.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 9: { - LogStep(9, "TH sends On command to DUT"); + case 10: { + LogStep(10, "TH sends On command to DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C04.Rsp && OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::On::Type value; @@ -27257,8 +26204,8 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 10: { - LogStep(10, "TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate)"); + case 11: { + LogStep(11, "TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate)"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; @@ -27272,14 +26219,14 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 11: { - LogStep(11, "TH reads CurrentLevel attribute from DUT"); + case 12: { + LogStep(12, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, + case 13: { + LogStep(13, "TH sends a MoveToLevel command to the DUT with Level = 200 and TransitionTime = 300 (30 s). This means the " "level should increase by 150 units in 30s, so 5 units/s"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); @@ -27295,71 +26242,71 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 13: { - LogStep(13, "Wait 10000ms"); + case 14: { + LogStep(14, "Wait 10000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 14: { - LogStep(14, "TH reads CurrentLevel attribute from DUT"); + case 15: { + LogStep(15, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, "Wait 10000ms"); + case 16: { + LogStep(16, "Wait 10000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 16: { - LogStep(16, "TH reads CurrentLevel attribute from DUT"); + case 17: { + LogStep(17, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 17: { - LogStep(17, "Wait 10000ms"); + case 18: { + LogStep(18, "Wait 10000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; return WaitForMs(kIdentityAlpha, value); } - case 18: { - LogStep(18, "TH reads CurrentLevel attribute from DUT"); + case 19: { + LogStep(19, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 19: { - LogStep(19, "Wait 5000ms"); + case 20: { + LogStep(20, "Wait 5000ms"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; return WaitForMs(kIdentityAlpha, value); } - case 20: { - LogStep(20, "TH reads CurrentLevel attribute from DUT"); + case 21: { + LogStep(21, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 21: { - LogStep(21, "TH reads CurrentLevel attribute from DUT"); + case 22: { + LogStep(22, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && !LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 22: { - LogStep(22, "TH writes 0 to the Options attribute"); + case 23: { + LogStep(23, "TH writes 0 to the Options attribute"); VerifyOrDo(!ShouldSkip("LVL.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::BitMask value; @@ -27367,14 +26314,14 @@ class Test_TC_LVL_3_1Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id, value, chip::NullOptional, chip::NullOptional); } - case 23: { - LogStep(23, "TH reads Options attribute"); + case 24: { + LogStep(24, "TH reads Options attribute"); VerifyOrDo(!ShouldSkip("LVL.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id, true, chip::NullOptional); } - case 24: { - LogStep(24, "TH sends On command to DUT"); + case 25: { + LogStep(25, "TH sends On command to DUT"); VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::On::Type value; @@ -27382,8 +26329,8 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 25: { - LogStep(25, "TH sends a MoveToLevel command to the DUT with"); + case 26: { + LogStep(26, "TH sends a MoveToLevel command to the DUT with"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; @@ -27397,14 +26344,14 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 26: { - LogStep(26, "TH reads CurrentLevel attribute from DUT"); + case 27: { + LogStep(27, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 27: { - LogStep(27, "TH sends Off command to DUT"); + case 28: { + LogStep(28, "TH sends Off command to DUT"); VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; @@ -27412,8 +26359,8 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 28: { - LogStep(28, "TH sends a MoveToLevel command to the DUT with"); + case 29: { + LogStep(29, "TH sends a MoveToLevel command to the DUT with"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; @@ -27427,14 +26374,14 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 29: { - LogStep(29, "TH reads CurrentLevel attribute from DUT"); + case 30: { + LogStep(30, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 30: { - LogStep(30, "TH sends a MoveToLevel command to the DUT with"); + case 31: { + LogStep(31, "TH sends a MoveToLevel command to the DUT with"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; @@ -27448,14 +26395,14 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 31: { - LogStep(31, "TH reads CurrentLevel attribute from DUT"); + case 32: { + LogStep(32, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 32: { - LogStep(32, "TH sends a MoveToLevel command to the DUT with"); + case 33: { + LogStep(33, "TH sends a MoveToLevel command to the DUT with"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; @@ -27469,14 +26416,14 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 33: { - LogStep(33, "TH reads CurrentLevel attribute from DUT"); + case 34: { + LogStep(34, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 34: { - LogStep(34, "TH writes 1 to the Options attribute"); + case 35: { + LogStep(35, "TH writes 1 to the Options attribute"); VerifyOrDo(!ShouldSkip("LVL.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::BitMask value; @@ -27484,14 +26431,14 @@ class Test_TC_LVL_3_1Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id, value, chip::NullOptional, chip::NullOptional); } - case 35: { - LogStep(35, "TH reads Options attribute"); + case 36: { + LogStep(36, "TH reads Options attribute"); VerifyOrDo(!ShouldSkip("LVL.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::Options::Id, true, chip::NullOptional); } - case 36: { - LogStep(36, "TH sends On command to DUT"); + case 37: { + LogStep(37, "TH sends On command to DUT"); VerifyOrDo(!ShouldSkip("OO.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::On::Type value; @@ -27499,8 +26446,8 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 37: { - LogStep(37, "TH sends a MoveToLevel command to the DUT with"); + case 38: { + LogStep(38, "TH sends a MoveToLevel command to the DUT with"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; @@ -27514,14 +26461,14 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 38: { - LogStep(38, "TH reads CurrentLevel attribute from DUT"); + case 39: { + LogStep(39, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 39: { - LogStep(39, "TH sends Off command to DUT"); + case 40: { + LogStep(40, "TH sends Off command to DUT"); VerifyOrDo(!ShouldSkip("OO.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::OnOff::Commands::Off::Type value; @@ -27529,8 +26476,8 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 40: { - LogStep(40, "TH sends a MoveToLevel command to the DUT with"); + case 41: { + LogStep(41, "TH sends a MoveToLevel command to the DUT with"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; @@ -27544,14 +26491,14 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 41: { - LogStep(41, "TH reads CurrentLevel attribute from DUT"); + case 42: { + LogStep(42, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 42: { - LogStep(42, "TH sends a MoveToLevel command to the DUT with"); + case 43: { + LogStep(43, "TH sends a MoveToLevel command to the DUT with"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; @@ -27565,14 +26512,14 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 43: { - LogStep(43, "TH reads CurrentLevel attribute from DUT"); + case 44: { + LogStep(44, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); } - case 44: { - LogStep(44, "TH sends a MoveToLevel command to the DUT with"); + case 45: { + LogStep(45, "TH sends a MoveToLevel command to the DUT with"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LevelControl::Commands::MoveToLevel::Type value; @@ -27586,8 +26533,8 @@ class Test_TC_LVL_3_1Suite : public TestCommand ); } - case 45: { - LogStep(45, "TH reads CurrentLevel attribute from DUT"); + case 46: { + LogStep(46, "TH reads CurrentLevel attribute from DUT"); VerifyOrDo(!ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), LevelControl::Id, LevelControl::Attributes::CurrentLevel::Id, true, chip::NullOptional); @@ -31851,29 +30798,19 @@ class Test_TC_ALOGIN_1_12Suite : public TestCommand } }; -class Test_TC_ALOGIN_12_1Suite : public TestCommand +class Test_TC_LOWPOWER_2_1Suite : public TestCommand { public: - Test_TC_ALOGIN_12_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_ALOGIN_12_1", 5, credsIssuerConfig) + Test_TC_LOWPOWER_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_LOWPOWER_2_1", 2, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("TempAccountIdentifier", &mTempAccountIdentifier); - AddArgument("catalogVendorId", 0, UINT16_MAX, &mCatalogVendorId); - AddArgument("applicationId", &mApplicationId); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ALOGIN_12_1Suite() - { - if (setupPINBuffer != nullptr) - { - chip::Platform::MemoryFree(setupPINBuffer); - setupPINBuffer = nullptr; - } - } + ~Test_TC_LOWPOWER_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -31884,14 +30821,8 @@ class Test_TC_ALOGIN_12_1Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mTempAccountIdentifier; - chip::Optional mCatalogVendorId; - chip::Optional mApplicationId; chip::Optional mTimeout; - char * setupPINBuffer = nullptr; - chip::CharSpan setupPIN; - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -31909,31 +30840,6 @@ class Test_TC_ALOGIN_12_1Suite : public TestCommand shouldContinue = true; break; case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::ApplicationLauncher::Commands::LauncherResponse::DecodableType 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)); - { - chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - if (setupPINBuffer != nullptr) - { - chip::Platform::MemoryFree(setupPINBuffer); - } - setupPINBuffer = static_cast(chip::Platform::MemoryAlloc(value.setupPIN.size())); - memcpy(setupPINBuffer, value.setupPIN.data(), value.setupPIN.size()); - setupPIN = chip::CharSpan(setupPINBuffer, value.setupPIN.size()); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; default: @@ -31959,55 +30865,12 @@ class Test_TC_ALOGIN_12_1Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 1: { - LogStep(1, "Launch an app with the provided a application ID"); - VerifyOrDo(!ShouldSkip("APPLAUNCHER.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::ApplicationLauncher::Commands::LaunchApp::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); - - value.data.Emplace(); - value.data.Value() = chip::ByteSpan(chip::Uint8::from_const_char("Hello Worldgarbage: not in length on purpose"), 11); - return SendCommand(kIdentityAlpha, GetEndpoint(3), ApplicationLauncher::Id, - ApplicationLauncher::Commands::LaunchApp::Id, value, chip::NullOptional - - ); - } - case 2: { - LogStep(2, "TH sends a GetSetupPIN command to the DUT with test values provided by the product maker."); - VerifyOrDo(!ShouldSkip("ALOGIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AccountLogin::Commands::GetSetupPIN::Type value; - value.tempAccountIdentifier = - mTempAccountIdentifier.HasValue() ? mTempAccountIdentifier.Value() : chip::Span("1111", 4); - return SendCommand(kIdentityAlpha, GetEndpoint(3), AccountLogin::Id, AccountLogin::Commands::GetSetupPIN::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 3: { - LogStep(3, "TH sends a Login command to the DUT with test values provided by the product maker."); - VerifyOrDo(!ShouldSkip("ALOGIN.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AccountLogin::Commands::Login::Type value; - value.tempAccountIdentifier = - mTempAccountIdentifier.HasValue() ? mTempAccountIdentifier.Value() : chip::Span("1111", 4); - value.setupPIN = setupPIN; - return SendCommand(kIdentityAlpha, GetEndpoint(3), AccountLogin::Id, AccountLogin::Commands::Login::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 4: { - LogStep(4, "TH sends a Logout command to the DUT with test values provided by the product maker."); - VerifyOrDo(!ShouldSkip("ALOGIN.S.C03.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(1, "TH sends Sleep command to DUT"); + VerifyOrDo(!ShouldSkip("LOWPOWER.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::AccountLogin::Commands::Logout::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(3), AccountLogin::Id, AccountLogin::Commands::Logout::Id, value, - chip::Optional(10000), chip::NullOptional + chip::app::Clusters::LowPower::Commands::Sleep::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(1), LowPower::Id, LowPower::Commands::Sleep::Id, value, + chip::NullOptional ); } @@ -32016,11 +30879,11 @@ class Test_TC_ALOGIN_12_1Suite : public TestCommand } }; -class Test_TC_LOWPOWER_2_1Suite : public TestCommand +class Test_TC_KEYPADINPUT_3_2Suite : public TestCommand { public: - Test_TC_LOWPOWER_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_LOWPOWER_2_1", 2, credsIssuerConfig) + Test_TC_KEYPADINPUT_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_KEYPADINPUT_3_2", 3, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -32028,88 +30891,7 @@ class Test_TC_LOWPOWER_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_LOWPOWER_2_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - 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 Sleep command to DUT"); - VerifyOrDo(!ShouldSkip("LOWPOWER.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LowPower::Commands::Sleep::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), LowPower::Id, LowPower::Commands::Sleep::Id, value, - chip::NullOptional - - ); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_KEYPADINPUT_3_2Suite : public TestCommand -{ -public: - Test_TC_KEYPADINPUT_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_KEYPADINPUT_3_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_KEYPADINPUT_3_2Suite() {} + ~Test_TC_KEYPADINPUT_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -33371,115 +32153,6 @@ class Test_TC_MEDIAINPUT_3_13Suite : public TestCommand } }; -class Test_TC_WAKEONLAN_4_1Suite : public TestCommand -{ -public: - Test_TC_WAKEONLAN_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_WAKEONLAN_4_1", 4, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_WAKEONLAN_4_1Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintMinLength("value", value, 12)); - } - 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; - 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 MACAddress attribute from the DUT"); - VerifyOrDo(!ShouldSkip("WAKEONLAN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), WakeOnLan::Id, WakeOnLan::Attributes::MACAddress::Id, true, - chip::NullOptional); - } - case 2: { - LogStep(2, "TH sends a Sleep command to DUT"); - VerifyOrDo(!ShouldSkip("LOWPOWER.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LowPower::Commands::Sleep::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(1), LowPower::Id, LowPower::Commands::Sleep::Id, value, - chip::NullOptional - - ); - } - case 3: { - LogStep(3, "TH sends a Wake-On LAN magic packet containing the MAC address from step 1"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' 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); - } - } - return CHIP_NO_ERROR; - } -}; - class Test_TC_CHANNEL_5_1Suite : public TestCommand { public: @@ -41426,7 +40099,7 @@ 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", 19, credsIssuerConfig) + Test_TC_SC_5_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_5_1", 31, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -41479,24 +40152,40 @@ class Test_TC_SC_5_1Suite : public TestCommand 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 8: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; @@ -41506,7 +40195,7 @@ class Test_TC_SC_5_1Suite : public TestCommand VerifyOrReturn(CheckValueAsString("groupName", value.groupName, chip::CharSpan("Test Group", 10))); } break; - case 9: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; @@ -41516,7 +40205,7 @@ class Test_TC_SC_5_1Suite : public TestCommand VerifyOrReturn(CheckValueAsString("groupName", value.groupName, chip::CharSpan("", 0))); } break; - case 10: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::GroupKeyManagement::Commands::KeySetReadResponse::DecodableType value; @@ -41537,7 +40226,11 @@ class Test_TC_SC_5_1Suite : public TestCommand CheckValue("groupKeySet.epochStartTime2.Value()", value.groupKeySet.epochStartTime2.Value(), 2220002ULL)); } break; - case 11: + 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< @@ -41554,7 +40247,11 @@ class Test_TC_SC_5_1Suite : public TestCommand } } break; - case 12: + 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< @@ -41581,7 +40278,11 @@ class Test_TC_SC_5_1Suite : public TestCommand } } break; - case 13: + 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< @@ -41608,10 +40309,18 @@ class Test_TC_SC_5_1Suite : public TestCommand } } break; - case 14: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; - case 15: + 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< @@ -41624,10 +40333,14 @@ class Test_TC_SC_5_1Suite : public TestCommand } } break; - case 16: + case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; - case 17: + 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< @@ -41640,8 +40353,16 @@ class Test_TC_SC_5_1Suite : public TestCommand } } break; - case 18: + 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)); @@ -41673,6 +40394,7 @@ class Test_TC_SC_5_1Suite : public TestCommand } 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; @@ -41718,7 +40440,18 @@ class Test_TC_SC_5_1Suite : public TestCommand chip::NullOptional, chip::NullOptional); } case 3: { - LogStep(3, "TH sends KeySetWrite command with incorrect key"); + 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; @@ -41746,8 +40479,19 @@ class Test_TC_SC_5_1Suite : public TestCommand ); } - case 4: { - LogStep(4, "TH sends KeySetWrite command with TH key"); + 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; @@ -41775,8 +40519,19 @@ class Test_TC_SC_5_1Suite : public TestCommand ); } - case 5: { - LogStep(5, "TH binds GroupId to GroupKeySet"); + 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; @@ -41794,8 +40549,18 @@ class Test_TC_SC_5_1Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); } - case 6: { - LogStep(6, "TH sends RemoveAllGroups command"); + 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, @@ -41803,8 +40568,8 @@ class Test_TC_SC_5_1Suite : public TestCommand ); } - case 7: { - LogStep(7, "TH sends AddGroup command"); + case 11: { + LogStep(11, "TH sends AddGroup command"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; value.groupID = 259U; @@ -41813,8 +40578,8 @@ class Test_TC_SC_5_1Suite : public TestCommand ); } - case 8: { - LogStep(8, "TH sends ViewGroup command"); + 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; @@ -41824,8 +40589,8 @@ class Test_TC_SC_5_1Suite : public TestCommand ); } - case 9: { - LogStep(9, "TH sends ViewGroup command"); + 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; @@ -41835,8 +40600,9 @@ class Test_TC_SC_5_1Suite : public TestCommand ); } - case 10: { - LogStep(10, "TH sends KeySetRead"); + 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; @@ -41845,25 +40611,67 @@ class Test_TC_SC_5_1Suite : public TestCommand ); } - case 11: { - LogStep(11, "TH reads GroupKeyMap Attribute from the GroupKeyManagement cluster"); + 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 12: { - LogStep(12, "TH reads GroupTable attribute"); - VerifyOrDo(!ShouldSkip("G.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 13: { - LogStep(13, "TH reads GroupTable attribute"); - VerifyOrDo(!ShouldSkip("!(G.S.F00)"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + 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 14: { - LogStep(14, "TH removes the GroupKeySet"); + 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; @@ -41872,13 +40680,34 @@ class Test_TC_SC_5_1Suite : public TestCommand ); } - case 15: { - LogStep(15, "TH verifies the corresponding GroupKeyMap entry has been removed"); + 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 16: { - LogStep(16, "TH cleans up groups using RemoveAllGroups command"); + 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, @@ -41886,13 +40715,25 @@ class Test_TC_SC_5_1Suite : public TestCommand ); } - case 17: { - LogStep(17, "TH verifies the group has been removed in the GroupTable"); + 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 18: { - LogStep(18, "TH removes ACL Operate privileges for Group 0x0103"); + 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; @@ -41922,6 +40763,16 @@ class Test_TC_SC_5_1Suite : public TestCommand 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; } @@ -41930,7 +40781,7 @@ class Test_TC_SC_5_1Suite : public TestCommand class Test_TC_SC_5_2Suite : public TestCommand { public: - Test_TC_SC_5_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_5_2", 15, credsIssuerConfig) + Test_TC_SC_5_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SC_5_2", 20, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -41983,14 +40834,26 @@ class Test_TC_SC_5_2Suite : public TestCommand 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; @@ -41999,22 +40862,22 @@ class Test_TC_SC_5_2Suite : public TestCommand VerifyOrReturn(CheckValue("groupID", value.groupID, 259U)); } break; - case 7: + 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 8: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 9: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 10: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; @@ -42024,7 +40887,7 @@ class Test_TC_SC_5_2Suite : public TestCommand VerifyOrReturn(CheckValueAsString("groupName", value.groupName, chip::CharSpan("Test Group 0101", 15))); } break; - case 11: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::Groups::Commands::ViewGroupResponse::DecodableType value; @@ -42034,14 +40897,22 @@ class Test_TC_SC_5_2Suite : public TestCommand VerifyOrReturn(CheckValueAsString("groupName", value.groupName, chip::CharSpan("", 0))); } break; - case 12: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 13: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; - case 14: + 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)); @@ -42073,6 +40944,7 @@ class Test_TC_SC_5_2Suite : public TestCommand } 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; @@ -42118,7 +40990,18 @@ class Test_TC_SC_5_2Suite : public TestCommand chip::NullOptional, chip::NullOptional); } case 3: { - LogStep(3, "TH sends KeySetWrite command with TH key"); + 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; @@ -42152,8 +41035,19 @@ class Test_TC_SC_5_2Suite : public TestCommand ); } - case 4: { - LogStep(4, "TH binds GroupId to GroupKeySet"); + 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; @@ -42175,8 +41069,18 @@ class Test_TC_SC_5_2Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), GroupKeyManagement::Id, GroupKeyManagement::Attributes::GroupKeyMap::Id, value, chip::NullOptional, chip::NullOptional); } - case 5: { - LogStep(5, "TH sends RemoveAllGroups command"); + 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, @@ -42184,8 +41088,8 @@ class Test_TC_SC_5_2Suite : public TestCommand ); } - case 6: { - LogStep(6, "TH sends AddGroup command"); + case 9: { + LogStep(9, "TH sends AddGroup command"); ListFreer listFreer; chip::app::Clusters::Groups::Commands::AddGroup::Type value; value.groupID = 259U; @@ -42194,23 +41098,23 @@ class Test_TC_SC_5_2Suite : public TestCommand ); } - case 7: { - LogStep(7, "TH sends AddGroup command again but using group messaging (0x0103)"); + 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 8: { - LogStep(8, "Wait for AddGroup"); + 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 9: { - LogStep(9, "Verify there is no response from DUT"); + 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; @@ -42220,8 +41124,8 @@ class Test_TC_SC_5_2Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 10: { - LogStep(10, "TH sends ViewGroup command"); + 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; @@ -42231,8 +41135,8 @@ class Test_TC_SC_5_2Suite : public TestCommand ); } - case 11: { - LogStep(11, "TH sends ViewGroup command"); + 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; @@ -42242,8 +41146,8 @@ class Test_TC_SC_5_2Suite : public TestCommand ); } - case 12: { - LogStep(12, "TH removes the GroupKeySet"); + case 15: { + LogStep(15, "TH removes the GroupKeySet"); ListFreer listFreer; chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type value; value.groupKeySetID = 419U; @@ -42252,8 +41156,18 @@ class Test_TC_SC_5_2Suite : public TestCommand ); } - case 13: { - LogStep(13, "TH cleans up groups using RemoveAllGroups command"); + 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, @@ -42261,8 +41175,9 @@ class Test_TC_SC_5_2Suite : public TestCommand ); } - case 14: { - LogStep(14, "TH removes ACL Operate privileges for Group 0x0103"); + 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; @@ -42292,6 +41207,16 @@ class Test_TC_SC_5_2Suite : public TestCommand 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; } @@ -45535,7 +44460,7 @@ class Test_TC_TSTAT_2_2Suite : public TestCommand LogStep(25, "Writes If TSTAT.S.F05(AUTO) LowerLimit = Max(MinCoolSetpointLimit, (OccupiedHeatingSetpoint + " "MinSetpointDeadBand)) to OccupiedCoolingSetpoint attribute when Auto is enabled"); - VerifyOrDo(!ShouldSkip("TSTAT.S.F05 && TSTAT.S.A0012 && PICS_SKIP_SAMPLE_APP"), + VerifyOrDo(!ShouldSkip("TSTAT.S.F05 && TSTAT.S.A0011 && PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -47966,7 +46891,7 @@ class Test_TC_DGTHREAD_1_1Suite : public TestCommand } case 8: { LogStep(8, "TH reads Feature dependent attribute(DGTHREAD.S.F01(ERRCNT)) in attributeList"); - VerifyOrDo(!ShouldSkip("DGTHREAD.C.A0006 && DGTHREAD.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A0006 && DGTHREAD.S.F01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Attributes::AttributeList::Id, true, chip::NullOptional); } @@ -48496,7 +47421,7 @@ class Test_TC_DGTHREAD_2_1Suite : public TestCommand } case 20: { LogStep(20, "TH reads ChildRoleCount attribute value from DUT"); - VerifyOrDo(!ShouldSkip("DGTHREAD.S.A001f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("DGTHREAD.S.A000f"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), ThreadNetworkDiagnostics::Id, ThreadNetworkDiagnostics::Attributes::ChildRoleCount::Id, true, chip::NullOptional); } @@ -83437,7 +82362,7 @@ class Test_TC_DRLK_2_3Suite : public TestCommand LogStep(6, "TH writes the RequirePINforRemoteOperation attribute value as False on the DUT and Verify DUT responds with " "UNSUPPORTED_WRITE"); - VerifyOrDo(!ShouldSkip("DRLK.S.F07 && DRLK.S.F00 && ! DRLK.S.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("DRLK.S.F07 && DRLK.S.F00 && !DRLK.S.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; bool value; value = false; @@ -83487,7 +82412,7 @@ class Test_TC_DRLK_2_3Suite : public TestCommand LogStep(11, "TH writes the RequirePINforRemoteOperation attribute value as False on the DUT and Verify DUT responds with " "UNSUPPORTED_WRITE"); - VerifyOrDo(!ShouldSkip("DRLK.S.F07 && DRLK.S.F00 && ! DRLK.S.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("DRLK.S.F07 && DRLK.S.F00 && !DRLK.S.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; bool value; value = true; @@ -83629,7 +82554,7 @@ class Test_TC_DRLK_2_3Suite : public TestCommand } case 24: { LogStep(24, "TH reads the UserCodeTemporaryDisableTime attribute from the DUT and check attribute is triggered"); - VerifyOrDo(!ShouldSkip("DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("DRLK.S.F00 && DRLK.S.F01 && DRLK.S.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::UserCodeTemporaryDisableTime::Id, true, chip::NullOptional); } @@ -84594,7 +83519,7 @@ class Test_TC_DRLK_2_6Suite : public TestCommand class Test_TC_DRLK_2_7Suite : public TestCommand { public: - Test_TC_DRLK_2_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DRLK_2_7", 18, credsIssuerConfig) + Test_TC_DRLK_2_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DRLK_2_7", 19, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -84781,6 +83706,9 @@ class Test_TC_DRLK_2_7Suite : public TestCommand case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -85011,7 +83939,7 @@ class Test_TC_DRLK_2_7Suite : public TestCommand ); } case 17: { - LogStep(17, "Cleanup the created user"); + LogStep(17, "Cleanup the created user with UserIndex 1"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearUser::Type value; value.userIndex = 1U; @@ -85020,6 +83948,16 @@ class Test_TC_DRLK_2_7Suite : public TestCommand ); } + case 18: { + LogStep(18, "Cleanup the created user with UserIndex 5"); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::ClearUser::Type value; + value.userIndex = 5U; + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearUser::Id, value, + chip::Optional(10000), chip::NullOptional + + ); + } } return CHIP_NO_ERROR; } @@ -85141,8 +84079,6 @@ class Test_TC_DRLK_2_9Suite : public TestCommand VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("status", value.status, 133U)); VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 3U)); } break; case 7: @@ -85152,8 +84088,6 @@ class Test_TC_DRLK_2_9Suite : public TestCommand VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("status", value.status, 2U)); VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 3U)); } break; case 8: @@ -85193,8 +84127,6 @@ class Test_TC_DRLK_2_9Suite : public TestCommand VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckValue("status", value.status, 0U)); VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); - VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); - VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); } break; case 15: @@ -85570,11 +84502,14 @@ class Test_TC_DRLK_2_9Suite : public TestCommand class Test_TC_DRLK_2_11Suite : public TestCommand { public: - Test_TC_DRLK_2_11Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DRLK_2_11", 18, credsIssuerConfig) + Test_TC_DRLK_2_11Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DRLK_2_11", 23, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("PINCredentialData", &mPINCredentialData); + AddArgument("RFIDCredentialData", &mRFIDCredentialData); + AddArgument("FingerVeinCredentialData", &mFingerVeinCredentialData); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } @@ -85589,6 +84524,9 @@ class Test_TC_DRLK_2_11Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mPINCredentialData; + chip::Optional mRFIDCredentialData; + chip::Optional mFingerVeinCredentialData; chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -85639,6 +84577,51 @@ class Test_TC_DRLK_2_11Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); + } + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); + } + break; + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; @@ -85649,7 +84632,7 @@ class Test_TC_DRLK_2_11Suite : public TestCommand VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); } break; - case 4: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; @@ -85660,7 +84643,7 @@ class Test_TC_DRLK_2_11Suite : public TestCommand VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); } break; - case 5: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; @@ -85671,7 +84654,7 @@ class Test_TC_DRLK_2_11Suite : public TestCommand VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); } break; - case 6: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; @@ -85687,7 +84670,7 @@ class Test_TC_DRLK_2_11Suite : public TestCommand VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); } break; - case 7: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; @@ -85703,7 +84686,7 @@ class Test_TC_DRLK_2_11Suite : public TestCommand VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); } break; - case 8: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; @@ -85719,10 +84702,10 @@ class Test_TC_DRLK_2_11Suite : public TestCommand VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); } break; - case 9: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; @@ -85738,7 +84721,7 @@ class Test_TC_DRLK_2_11Suite : public TestCommand VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); } break; - case 11: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; @@ -85754,10 +84737,10 @@ class Test_TC_DRLK_2_11Suite : public TestCommand VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); } break; - case 12: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 13: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; @@ -85773,10 +84756,10 @@ class Test_TC_DRLK_2_11Suite : public TestCommand VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); } break; - case 14: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 15: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; @@ -85788,7 +84771,7 @@ class Test_TC_DRLK_2_11Suite : public TestCommand VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); } break; - case 16: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; @@ -85800,7 +84783,7 @@ class Test_TC_DRLK_2_11Suite : public TestCommand VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); } break; - case 17: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; @@ -85866,7 +84849,37 @@ class Test_TC_DRLK_2_11Suite : public TestCommand ); } case 3: { - LogStep(3, "TH sends Set Credential Command to DUT with type PIN"); + LogStep(3, "TH reads NumberOfTotalUsersSupported and saves for future use."); + VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.A0011"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, + DoorLock::Attributes::NumberOfTotalUsersSupported::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads MinPINCodeLength and saves for future use."); + VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::MinPINCodeLength::Id, true, + chip::NullOptional); + } + case 5: { + LogStep(5, "TH reads MaxPINCodeLength and saves for future use."); + VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::MaxPINCodeLength::Id, true, + chip::NullOptional); + } + case 6: { + LogStep(6, "TH reads MinRFIDCodeLength and saves for future use."); + VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.F01 && DRLK.S.A001a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::MinRFIDCodeLength::Id, true, + chip::NullOptional); + } + case 7: { + LogStep(7, "TH reads MaxRFIDCodeLength and saves for future use."); + VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.F01 && DRLK.S.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::MaxRFIDCodeLength::Id, true, + chip::NullOptional); + } + case 8: { + LogStep(8, "TH sends Set Credential Command to DUT with type PIN"); VerifyOrDo(!ShouldSkip("DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -85876,7 +84889,8 @@ class Test_TC_DRLK_2_11Suite : public TestCommand value.credential.credentialType = static_cast(1); value.credential.credentialIndex = 1U; - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); + value.credentialData = mPINCredentialData.HasValue() ? mPINCredentialData.Value() + : chip::ByteSpan(chip::Uint8::from_const_char("123456"), 6); value.userIndex.SetNonNull(); value.userIndex.Value() = 1U; value.userStatus.SetNull(); @@ -85886,8 +84900,8 @@ class Test_TC_DRLK_2_11Suite : public TestCommand ); } - case 4: { - LogStep(4, "TH sends Set Credential Command to DUT with type RFID"); + case 9: { + LogStep(9, "TH sends Set Credential Command to DUT with type RFID"); VerifyOrDo(!ShouldSkip("DRLK.S.F01 && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -85897,8 +84911,9 @@ class Test_TC_DRLK_2_11Suite : public TestCommand value.credential.credentialType = static_cast(2); value.credential.credentialIndex = 1U; - value.credentialData = - chip::ByteSpan(chip::Uint8::from_const_char("RFIDTESTDATAgarbage: not in length on purpose"), 12); + value.credentialData = mRFIDCredentialData.HasValue() + ? mRFIDCredentialData.Value() + : chip::ByteSpan(chip::Uint8::from_const_char("RFIDTESTDATA"), 12); value.userIndex.SetNonNull(); value.userIndex.Value() = 1U; value.userStatus.SetNull(); @@ -85908,8 +84923,8 @@ class Test_TC_DRLK_2_11Suite : public TestCommand ); } - case 5: { - LogStep(5, "TH sends Set Credential Command to DUT with type FingerVein"); + case 10: { + LogStep(10, "TH sends Set Credential Command to DUT with type FingerVein"); VerifyOrDo(!ShouldSkip("DRLK.S.F02 && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -85919,7 +84934,8 @@ class Test_TC_DRLK_2_11Suite : public TestCommand value.credential.credentialType = static_cast(4); value.credential.credentialIndex = 1U; - value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); + value.credentialData = mFingerVeinCredentialData.HasValue() ? mFingerVeinCredentialData.Value() + : chip::ByteSpan(chip::Uint8::from_const_char("123456"), 6); value.userIndex.SetNonNull(); value.userIndex.Value() = 1U; value.userStatus.SetNull(); @@ -85929,8 +84945,8 @@ class Test_TC_DRLK_2_11Suite : public TestCommand ); } - case 6: { - LogStep(6, "TH sends Get Credential Status Command with type PIN"); + case 11: { + LogStep(11, "TH sends Get Credential Status Command with type PIN"); VerifyOrDo(!ShouldSkip("DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -85944,9 +84960,9 @@ class Test_TC_DRLK_2_11Suite : public TestCommand ); } - case 7: { - LogStep(7, "TH sends Get Credential Status Command with type RFID"); - VerifyOrDo(!ShouldSkip("DRLK.S.F01 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), + case 12: { + LogStep(12, "TH sends Get Credential Status Command with type RFID"); + VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.F01 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; @@ -85959,9 +84975,9 @@ class Test_TC_DRLK_2_11Suite : public TestCommand ); } - case 8: { - LogStep(8, "TH sends Get Credential Status Command with type FingerVein"); - VerifyOrDo(!ShouldSkip("DRLK.S.F02 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), + case 13: { + LogStep(13, "TH sends Get Credential Status Command with type FingerVein"); + VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.F02 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; @@ -85974,8 +84990,8 @@ class Test_TC_DRLK_2_11Suite : public TestCommand ); } - case 9: { - LogStep(9, "TH sends Clear Credential Command to DUT with type PIN"); + case 14: { + LogStep(14, "TH sends Clear Credential Command to DUT with type PIN"); VerifyOrDo(!ShouldSkip("DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C26.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; @@ -85989,9 +85005,9 @@ class Test_TC_DRLK_2_11Suite : public TestCommand ); } - case 10: { - LogStep(10, "TH sends Get Credential Status Command with type RFID"); - VerifyOrDo(!ShouldSkip("DRLK.S.F01 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), + case 15: { + LogStep(15, "TH sends Get Credential Status Command with type RFID"); + VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.F01 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; @@ -86004,9 +85020,9 @@ class Test_TC_DRLK_2_11Suite : public TestCommand ); } - case 11: { - LogStep(11, "TH sends Get Credential Status Command with type FingerVein"); - VerifyOrDo(!ShouldSkip("DRLK.S.F02 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), + case 16: { + LogStep(16, "TH sends Get Credential Status Command with type FingerVein"); + VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.F02 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; @@ -86019,8 +85035,8 @@ class Test_TC_DRLK_2_11Suite : public TestCommand ); } - case 12: { - LogStep(12, "TH sends Clear Credential Command to DUT with type RFID"); + case 17: { + LogStep(17, "TH sends Clear Credential Command to DUT with type RFID"); VerifyOrDo(!ShouldSkip("DRLK.S.F01 && DRLK.S.F08 && DRLK.S.C26.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; @@ -86034,9 +85050,9 @@ class Test_TC_DRLK_2_11Suite : public TestCommand ); } - case 13: { - LogStep(13, "TH sends Get Credential Status Command with type FingerVein"); - VerifyOrDo(!ShouldSkip("DRLK.S.F02 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), + case 18: { + LogStep(18, "TH sends Get Credential Status Command with type FingerVein"); + VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.F02 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; @@ -86049,8 +85065,8 @@ class Test_TC_DRLK_2_11Suite : public TestCommand ); } - case 14: { - LogStep(14, "TH sends Clear Credential Command to DUT with type FingerVein"); + case 19: { + LogStep(19, "TH sends Clear Credential Command to DUT with type FingerVein"); VerifyOrDo(!ShouldSkip("DRLK.S.F02 && DRLK.S.F08 && DRLK.S.C26.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; @@ -86064,8 +85080,8 @@ class Test_TC_DRLK_2_11Suite : public TestCommand ); } - case 15: { - LogStep(15, "TH sends Get Credential Status Command to DUT with type PIN"); + case 20: { + LogStep(20, "TH sends Get Credential Status Command to DUT with type PIN"); VerifyOrDo(!ShouldSkip("DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -86079,8 +85095,8 @@ class Test_TC_DRLK_2_11Suite : public TestCommand ); } - case 16: { - LogStep(16, "TH sends Get Credential Status Command to DUT with type RFID"); + case 21: { + LogStep(21, "TH sends Get Credential Status Command to DUT with type RFID"); VerifyOrDo(!ShouldSkip("DRLK.S.F01 && DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -86094,8 +85110,8 @@ class Test_TC_DRLK_2_11Suite : public TestCommand ); } - case 17: { - LogStep(17, "TH sends Get Credential Status Command to DUT with type FingerVein"); + case 22: { + LogStep(22, "TH sends Get Credential Status Command to DUT with type FingerVein"); VerifyOrDo(!ShouldSkip("DRLK.S.F02 && DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -94835,6 +93851,61 @@ class Test_TC_DGGEN_3_1Suite : public TestCommand } }; +class Test_TC_I_3_1Suite : public TestCommand +{ +public: + Test_TC_I_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_I_3_1", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_I_3_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + {} + return CHIP_NO_ERROR; + } +}; + class Test_TC_I_3_2Suite : public TestCommand { public: @@ -97221,6 +96292,118 @@ class Test_TC_ALOGIN_12_2Suite : public TestCommand } }; +class Test_TC_WAKEONLAN_4_1Suite : public TestCommand +{ +public: + Test_TC_WAKEONLAN_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_WAKEONLAN_4_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_WAKEONLAN_4_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_ALOGIN_12_1Suite : public TestCommand +{ +public: + Test_TC_ALOGIN_12_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_ALOGIN_12_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_ALOGIN_12_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_CADMIN_1_1Suite : public TestCommand { public: @@ -97445,33 +96628,261 @@ class Test_TC_CADMIN_1_11Suite : public TestCommand { public: Test_TC_CADMIN_1_11Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_11", 26, credsIssuerConfig) + TestCommand("Test_TC_CADMIN_1_11", 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_CADMIN_1_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 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_CADMIN_1_12Suite : public TestCommand +{ +public: + Test_TC_CADMIN_1_12Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_CADMIN_1_12", 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_CADMIN_1_12Suite() {} + + 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_CADMIN_1_14Suite : public TestCommand +{ +public: + Test_TC_CADMIN_1_14Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_CADMIN_1_14", 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_CADMIN_1_14Suite() {} + + 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_CADMIN_1_15Suite : public TestCommand +{ +public: + Test_TC_CADMIN_1_15Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_CADMIN_1_15", 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_CADMIN_1_15Suite() {} + + 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_CADMIN_1_16Suite : public TestCommand +{ +public: + Test_TC_CADMIN_1_16Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_CADMIN_1_16", 25, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); AddArgument("nodeId3", 0, UINT64_MAX, &mNodeId3); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("waitAfterCommissioning", 0, UINT16_MAX, &mWaitAfterCommissioning); AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); AddArgument("payload", &mPayload); - AddArgument("PakeVerifier", &mPakeVerifier); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CADMIN_1_11Suite() {} + ~Test_TC_CADMIN_1_16Suite() {} - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(400)); } + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } private: chip::Optional mNodeId; - chip::Optional mTimeout; chip::Optional mNodeId2; chip::Optional mNodeId3; chip::Optional mEndpoint; chip::Optional mWaitAfterCommissioning; chip::Optional mDiscriminator; chip::Optional mPayload; - chip::Optional mPakeVerifier; + chip::Optional mTimeout; + + uint8_t TH3FabricIndex; + uint8_t TH2FabricIndex; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -97514,10 +96925,10 @@ class Test_TC_CADMIN_1_11Suite : public TestCommand break; case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -97529,21 +96940,56 @@ class Test_TC_CADMIN_1_11Suite : public TestCommand break; case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + TH3FabricIndex = value; + } break; case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); + VerifyOrReturn(CheckValue("fabrics[0].nodeID", iter_0.GetValue().nodeID, + mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); + VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckValue("fabrics[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); + VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); + VerifyOrReturn(CheckValue("fabrics[1].nodeID", iter_0.GetValue().nodeID, + mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); + VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckValue("fabrics[1].fabricIndex", iter_0.GetValue().fabricIndex, 2U)); + VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 2)); + VerifyOrReturn(CheckValue("fabrics[2].nodeID", iter_0.GetValue().nodeID, + mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL)); + VerifyOrReturn(CheckValueAsString("fabrics[2].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckValue("fabrics[2].fabricIndex", iter_0.GetValue().fabricIndex, 3U)); + VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 3)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } break; case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + } break; case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.HasValue(), true)); - VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.Value(), 2)); 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< @@ -97556,23 +97002,17 @@ class Test_TC_CADMIN_1_11Suite : public TestCommand VerifyOrReturn(CheckValue("fabrics[0].nodeID", iter_0.GetValue().nodeID, mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckValue("fabrics[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); VerifyOrReturn(CheckValue("fabrics[1].nodeID", iter_0.GetValue().nodeID, mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL)); VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 2)); - VerifyOrReturn(CheckValue("fabrics[2].nodeID", iter_0.GetValue().nodeID, - mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[2].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 3)); + VerifyOrReturn(CheckValue("fabrics[1].fabricIndex", iter_0.GetValue().fabricIndex, 3U)); + VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 2)); } VerifyOrReturn(CheckConstraintType("value", "list", "list")); } 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; @@ -97585,13 +97025,16 @@ class Test_TC_CADMIN_1_11Suite : public TestCommand shouldContinue = true; break; case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.HasValue(), true)); - VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.Value(), 2)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + TH2FabricIndex = value; + } break; case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -97606,14 +97049,17 @@ class Test_TC_CADMIN_1_11Suite : public TestCommand VerifyOrReturn(CheckValue("fabrics[0].nodeID", iter_0.GetValue().nodeID, mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckValue("fabrics[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); VerifyOrReturn(CheckValue("fabrics[1].nodeID", iter_0.GetValue().nodeID, - mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL)); + mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckValue("fabrics[1].fabricIndex", iter_0.GetValue().fabricIndex, 4U)); VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 2)); VerifyOrReturn(CheckValue("fabrics[2].nodeID", iter_0.GetValue().nodeID, - mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); + mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL)); VerifyOrReturn(CheckValueAsString("fabrics[2].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckValue("fabrics[2].fabricIndex", iter_0.GetValue().fabricIndex, 3U)); VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 3)); } VerifyOrReturn(CheckConstraintType("value", "list", "list")); @@ -97621,15 +97067,17 @@ class Test_TC_CADMIN_1_11Suite : public TestCommand break; case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + } break; case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.HasValue(), true)); - VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.Value(), 2)); + { + chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + } break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); @@ -97673,25 +97121,13 @@ class Test_TC_CADMIN_1_11Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 3: { - LogStep(3, "TH_CR1 opens a commissioning window on DUT_CE using ECM"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "TH_CR1 opens a commissioning window on DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; value.commissioningTimeout = 180U; - value.PAKEPasscodeVerifier = mPakeVerifier.HasValue() - ? mPakeVerifier.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\xb9\x61\x70\xaa\xe8\x03\x34\x68\x84\x72\x4f\xe9\xa3\xb2\x87\xc3\x03\x30\xc2\xa6\x60\x37\x5d\x17\xbb\x20" - "\x5a\x8c\xf1\xae\xcb\x35\x04\x57\xf8\xab\x79\xee\x25\x3a\xb6\xa8\xe4\x6b\xb0\x9e\x54\x3a\xe4\x22\x73\x6d" - "\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51" - "\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf"), - 97); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, + AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, chip::Optional(10000), chip::NullOptional ); @@ -97704,154 +97140,108 @@ class Test_TC_CADMIN_1_11Suite : public TestCommand return WaitForMs(kIdentityAlpha, value); } case 5: { - LogStep(5, "Verify that the DNS-SD advertisement shows CM=2"); - 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_CR3 starts a commissioning process with DUT_CE"); + LogStep(5, "TH_CR2 starts a commissioning process with DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityGamma, value); + return PairWithCode(kIdentityBeta, value); } - case 7: { - LogStep(7, "DUT_CE is commissioned to TH_CR3 on Fabric ID3 with Node ID3"); + case 6: { + LogStep(6, "DUT_CE is commissioned to TH_CR2"); VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; - return WaitForCommissionee(kIdentityGamma, value); + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + return WaitForCommissionee(kIdentityBeta, value); } - case 8: { - LogStep(8, "TH_CR1 opens a commissioning window on DUT_CE using ECM"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 7: { + LogStep(7, "TH_CR1 opens a commissioning window on DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; value.commissioningTimeout = 180U; - value.PAKEPasscodeVerifier = mPakeVerifier.HasValue() - ? mPakeVerifier.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\xb9\x61\x70\xaa\xe8\x03\x34\x68\x84\x72\x4f\xe9\xa3\xb2\x87\xc3\x03\x30\xc2\xa6\x60\x37\x5d\x17\xbb\x20" - "\x5a\x8c\xf1\xae\xcb\x35\x04\x57\xf8\xab\x79\xee\x25\x3a\xb6\xa8\xe4\x6b\xb0\x9e\x54\x3a\xe4\x22\x73\x6d" - "\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51" - "\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf"), - 97); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, + AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, chip::Optional(10000), chip::NullOptional ); } - case 9: { - LogStep(9, "Waiting after opening commissioning window"); + case 8: { + LogStep(8, "Waiting after opening commissioning window"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; return WaitForMs(kIdentityAlpha, value); } - case 10: { - LogStep(10, "TH_CR2 starts a commissioning process with DUT_CE"); + case 9: { + LogStep(9, "TH_CR3 Commissions with DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityBeta, value); + return PairWithCode(kIdentityGamma, value); } - case 11: { - LogStep(11, "DUT_CE is commissioned to TH_CR2"); + case 10: { + LogStep(10, "DUT_CE is commissioned to TH_CR3"); VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - return WaitForCommissionee(kIdentityBeta, value); + value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; + return WaitForCommissionee(kIdentityGamma, value); + } + case 11: { + LogStep(11, "TH3 reads CurrentFabricIndex attribute and save it for future use."); + return ReadAttribute(kIdentityGamma, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "TH_CR1 opens a commissioning window on DUT_CE using ECM"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - value.PAKEPasscodeVerifier = mPakeVerifier.HasValue() - ? mPakeVerifier.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\xb9\x61\x70\xaa\xe8\x03\x34\x68\x84\x72\x4f\xe9\xa3\xb2\x87\xc3\x03\x30\xc2\xa6\x60\x37\x5d\x17\xbb\x20" - "\x5a\x8c\xf1\xae\xcb\x35\x04\x57\xf8\xab\x79\xee\x25\x3a\xb6\xa8\xe4\x6b\xb0\x9e\x54\x3a\xe4\x22\x73\x6d" - "\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51" - "\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf"), - 97); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); + LogStep(12, "TH_CR2 reads the list of Fabrics on DUT_CE"); + VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); } case 13: { - LogStep(13, "Waiting after opening commissioning window"); + LogStep(13, "TH_CR2 sends RemoveFabric with FabricIndex = 2 command to DUT_CE"); + VerifyOrDo(!ShouldSkip("OPCREDS.S.C0a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; - return WaitForMs(kIdentityAlpha, value); + chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type value; + value.fabricIndex = 2U; + return SendCommand(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Commands::RemoveFabric::Id, value, chip::Optional(10000), + chip::NullOptional + + ); } case 14: { - LogStep(14, - "Before the expiration of PIXIT.CADMIN.CwDuration seconds which was set in step 5, TH_CR1 opens a 2nd " - "commissioning window on DUT_CE using a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(14, "TH_CR2 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); + VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - value.PAKEPasscodeVerifier = mPakeVerifier.HasValue() - ? mPakeVerifier.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\xb9\x61\x70\xaa\xe8\x03\x34\x68\x84\x72\x4f\xe9\xa3\xb2\x87\xc3\x03\x30\xc2\xa6\x60\x37\x5d\x17\xbb\x20" - "\x5a\x8c\xf1\xae\xcb\x35\x04\x57\xf8\xab\x79\xee\x25\x3a\xb6\xa8\xe4\x6b\xb0\x9e\x54\x3a\xe4\x22\x73\x6d" - "\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51" - "\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf"), - 97); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); + chip::CharSpan value; + value = chip::Span("chiptestgarbage: not in length on purpose", 8); + return WriteAttribute(kIdentityBeta, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, + value, chip::NullOptional, chip::NullOptional); } case 15: { - LogStep(15, "TH_CR1 reads the list of Fabrics on DUT_CE"); + LogStep(15, "TH_CR2 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); + VerifyOrDo(!ShouldSkip("BINFO.S.A0005 && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 16: { + LogStep(16, "TH_CR1 reads the list of Fabrics on DUT_CE"); VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); } - case 16: { - LogStep(16, "Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that was set in step 6"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 180000UL; - return WaitForMs(kIdentityAlpha, value); - } case 17: { - LogStep(17, - "TH_CR1 re-opens a commissioning window on DUT_CE using a commissioning timeout of PIXIT.CADMIN.CwDuration " - "seconds using BCM"); + LogStep(17, "TH_CR1 opens a commissioning window on DUT_CE using BCM"); VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; @@ -97870,35 +97260,26 @@ class Test_TC_CADMIN_1_11Suite : public TestCommand return WaitForMs(kIdentityAlpha, value); } case 19: { - LogStep(19, "Verify that the DNS-SD advertisement shows CM=1"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(19, "TH_CR2 starts a commissioning process with DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), 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); + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + return PairWithCode(kIdentityBeta, value); } case 20: { - LogStep(20, - "Before the expiration of PIXIT.CADMIN.CwDuration seconds that was set in step 10, TH_CR3 opens a 2nd " - "commissioning window on DUT_CE using a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(20, "DUT_CE is commissioned to TH_CR2"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityGamma, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + return WaitForCommissionee(kIdentityBeta, value); } case 21: { - LogStep(21, "Wait for the expiration of PIXIT.CADMIN.CwDuration seconds that was set in step 11"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 180000UL; - return WaitForMs(kIdentityAlpha, value); + LogStep(21, "TH2 reads CurrentFabricIndex attribute and save it for future use."); + return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); } case 22: { LogStep(22, "TH_CR1 reads the list of Fabrics on DUT_CE"); @@ -97907,35 +97288,26 @@ class Test_TC_CADMIN_1_11Suite : public TestCommand OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); } case 23: { - LogStep(23, "TH_CR1 opens a commissioning window on DUT_CE using BCM"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(23, "Remove TH2 FabricIndex"); + VerifyOrDo(!ShouldSkip("OPCREDS.S.C0a.Rsp && CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional + chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type value; + value.fabricIndex = TH2FabricIndex; + return SendCommand(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Commands::RemoveFabric::Id, value, chip::Optional(10000), + chip::NullOptional ); } case 24: { - LogStep(24, "Waiting after opening commissioning window"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 25: { - LogStep(25, - "Before the expiration of PIXIT.CADMIN.CwDuration seconds that was set in step 14, TH_CR2 opens a second " - "commissioning window on DUT_CE using a commissioning timeout of PIXIT.CADMIN.CwDuration seconds using BCM"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(24, "Remove TH3 FabricIndex"); + VerifyOrDo(!ShouldSkip("OPCREDS.S.C0a.Rsp && CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityBeta, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional + chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type value; + value.fabricIndex = TH3FabricIndex; + return SendCommand(kIdentityGamma, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Commands::RemoveFabric::Id, value, chip::Optional(10000), + chip::NullOptional ); } @@ -97944,11 +97316,11 @@ class Test_TC_CADMIN_1_11Suite : public TestCommand } }; -class Test_TC_CADMIN_1_12Suite : public TestCommand +class Test_TC_CADMIN_1_17Suite : public TestCommand { public: - Test_TC_CADMIN_1_12Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_12", 0, credsIssuerConfig) + Test_TC_CADMIN_1_17Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_CADMIN_1_17", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -97956,7 +97328,7 @@ class Test_TC_CADMIN_1_12Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CADMIN_1_12Suite() {} + ~Test_TC_CADMIN_1_17Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -98000,11 +97372,11 @@ class Test_TC_CADMIN_1_12Suite : public TestCommand } }; -class Test_TC_CADMIN_1_14Suite : public TestCommand +class Test_TC_CADMIN_1_18Suite : public TestCommand { public: - Test_TC_CADMIN_1_14Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_14", 0, credsIssuerConfig) + Test_TC_CADMIN_1_18Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_CADMIN_1_18", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -98012,7 +97384,7 @@ class Test_TC_CADMIN_1_14Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CADMIN_1_14Suite() {} + ~Test_TC_CADMIN_1_18Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -98056,24 +97428,19 @@ class Test_TC_CADMIN_1_14Suite : public TestCommand } }; -class Test_TC_CADMIN_1_15Suite : public TestCommand +class Test_TC_CADMIN_1_19Suite : public TestCommand { public: - Test_TC_CADMIN_1_15Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_15", 22, credsIssuerConfig) + Test_TC_CADMIN_1_19Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_CADMIN_1_19", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); - AddArgument("nodeId3", 0, UINT64_MAX, &mNodeId3); + AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("waitAfterCommissioning", 0, UINT16_MAX, &mWaitAfterCommissioning); - AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); - AddArgument("payload", &mPayload); - AddArgument("PakeVerifier", &mPakeVerifier); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CADMIN_1_15Suite() {} + ~Test_TC_CADMIN_1_19Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -98082,13 +97449,8 @@ class Test_TC_CADMIN_1_15Suite : public TestCommand private: chip::Optional mNodeId; - chip::Optional mNodeId2; - chip::Optional mNodeId3; + chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mWaitAfterCommissioning; - chip::Optional mDiscriminator; - chip::Optional mPayload; - chip::Optional mPakeVerifier; chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -98103,163 +97465,6 @@ class Test_TC_CADMIN_1_15Suite : public TestCommand switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValue("fabrics[0].nodeID", iter_0.GetValue().nodeID, - mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckValue("fabrics[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); - VerifyOrReturn(CheckValue("fabrics[1].nodeID", iter_0.GetValue().nodeID, - mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckValue("fabrics[1].fabricIndex", iter_0.GetValue().fabricIndex, 2U)); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 2)); - VerifyOrReturn(CheckValue("fabrics[2].nodeID", iter_0.GetValue().nodeID, - mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[2].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckValue("fabrics[2].fabricIndex", iter_0.GetValue().fabricIndex, 3U)); - VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 3)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValue("fabrics[0].nodeID", iter_0.GetValue().nodeID, - mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckValue("fabrics[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); - VerifyOrReturn(CheckValue("fabrics[1].nodeID", iter_0.GetValue().nodeID, - mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckValue("fabrics[1].fabricIndex", iter_0.GetValue().fabricIndex, 3U)); - VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 2)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - 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)); - shouldContinue = true; - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValue("fabrics[0].nodeID", iter_0.GetValue().nodeID, - mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckValue("fabrics[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); - VerifyOrReturn(CheckValue("fabrics[1].nodeID", iter_0.GetValue().nodeID, - mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckValue("fabrics[1].fabricIndex", iter_0.GetValue().fabricIndex, 4U)); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 2)); - VerifyOrReturn(CheckValue("fabrics[2].nodeID", iter_0.GetValue().nodeID, - mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[2].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckValue("fabrics[2].fabricIndex", iter_0.GetValue().fabricIndex, 3U)); - VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 3)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -98274,259 +97479,24 @@ class Test_TC_CADMIN_1_15Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - case 0: { - LogStep(0, "Precondition: Reset Devices to factory defaults"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; - return FactoryReset(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Precondition: Reset Devices to factory defaults"); - 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("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); - } - case 2: { - LogStep(2, "TH_CR1 starts a commissioning process with DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "TH_CR1 opens a commissioning window on DUT_CE using ECM"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - value.PAKEPasscodeVerifier = mPakeVerifier.HasValue() - ? mPakeVerifier.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\xb9\x61\x70\xaa\xe8\x03\x34\x68\x84\x72\x4f\xe9\xa3\xb2\x87\xc3\x03\x30\xc2\xa6\x60\x37\x5d\x17\xbb\x20" - "\x5a\x8c\xf1\xae\xcb\x35\x04\x57\xf8\xab\x79\xee\x25\x3a\xb6\xa8\xe4\x6b\xb0\x9e\x54\x3a\xe4\x22\x73\x6d" - "\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51" - "\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf"), - 97); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Waiting after opening commissioning window"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "TH_CR2 starts a commissioning process with DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 6: { - LogStep(6, "DUT_CE is commissioned to TH_CR2"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - return WaitForCommissionee(kIdentityBeta, value); - } - case 7: { - LogStep(7, "TH_CR1 opens a commissioning window on DUT_CE using ECM"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - value.PAKEPasscodeVerifier = mPakeVerifier.HasValue() - ? mPakeVerifier.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\xb9\x61\x70\xaa\xe8\x03\x34\x68\x84\x72\x4f\xe9\xa3\xb2\x87\xc3\x03\x30\xc2\xa6\x60\x37\x5d\x17\xbb\x20" - "\x5a\x8c\xf1\xae\xcb\x35\x04\x57\xf8\xab\x79\xee\x25\x3a\xb6\xa8\xe4\x6b\xb0\x9e\x54\x3a\xe4\x22\x73\x6d" - "\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51" - "\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf"), - 97); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 8: { - LogStep(8, "Waiting after opening commissioning window"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 9: { - LogStep(9, "TH_CR3 Commissions with DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityGamma, value); - } - case 10: { - LogStep(10, "DUT_CE is commissioned to TH_CR3"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; - return WaitForCommissionee(kIdentityGamma, value); - } - case 11: { - LogStep(11, "TH_CR2 reads the list of Fabrics on DUT_CE"); - VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); - } - case 12: { - LogStep(12, "TH_CR2 sends RemoveFabric with FabricIndex = 2 command to DUT_CE"); - VerifyOrDo(!ShouldSkip("OPCREDS.S.C0a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type value; - value.fabricIndex = 2U; - return SendCommand(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Commands::RemoveFabric::Id, value, chip::Optional(10000), - chip::NullOptional - - ); - } - case 13: { - LogStep(13, "TH_CR2 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("chiptestgarbage: not in length on purpose", 8); - return WriteAttribute(kIdentityBeta, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 14: { - LogStep(14, "TH_CR2 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0005 && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 15: { - LogStep(15, "TH_CR1 reads the list of Fabrics on DUT_CE"); - VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); - } - case 16: { - LogStep(16, - "Verify DUT_CE is now discoverable over DNS-SD with 2 Operational service records (_matter._tcp SRV records)."); - 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_CR1 opens a commissioning window on DUT_CE using ECM"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - value.PAKEPasscodeVerifier = mPakeVerifier.HasValue() - ? mPakeVerifier.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\xb9\x61\x70\xaa\xe8\x03\x34\x68\x84\x72\x4f\xe9\xa3\xb2\x87\xc3\x03\x30\xc2\xa6\x60\x37\x5d\x17\xbb\x20" - "\x5a\x8c\xf1\xae\xcb\x35\x04\x57\xf8\xab\x79\xee\x25\x3a\xb6\xa8\xe4\x6b\xb0\x9e\x54\x3a\xe4\x22\x73\x6d" - "\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51" - "\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf"), - 97); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 18: { - LogStep(18, "Waiting after opening commissioning window"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 19: { - LogStep(19, "TH_CR2 starts a commissioning process with DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 20: { - LogStep(20, "DUT_CE is commissioned to TH_CR2"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - return WaitForCommissionee(kIdentityBeta, value); - } - case 21: { - LogStep(21, "TH_CR1 reads the list of Fabrics on DUT_CE"); - VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); - } - } + {} return CHIP_NO_ERROR; } }; -class Test_TC_CADMIN_1_16Suite : public TestCommand +class Test_TC_CADMIN_1_20Suite : public TestCommand { public: - Test_TC_CADMIN_1_16Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_16", 21, credsIssuerConfig) + Test_TC_CADMIN_1_20Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_CADMIN_1_20", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); - AddArgument("nodeId3", 0, UINT64_MAX, &mNodeId3); + AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("waitAfterCommissioning", 0, UINT16_MAX, &mWaitAfterCommissioning); - AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); - AddArgument("payload", &mPayload); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_CADMIN_1_16Suite() {} + ~Test_TC_CADMIN_1_20Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -98535,12 +97505,8 @@ class Test_TC_CADMIN_1_16Suite : public TestCommand private: chip::Optional mNodeId; - chip::Optional mNodeId2; - chip::Optional mNodeId3; + chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mWaitAfterCommissioning; - chip::Optional mDiscriminator; - chip::Optional mPayload; chip::Optional mTimeout; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -98548,1560 +97514,13 @@ class Test_TC_CADMIN_1_16Suite : public TestCommand // // Tests methods // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValue("fabrics[0].nodeID", iter_0.GetValue().nodeID, - mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckValue("fabrics[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); - VerifyOrReturn(CheckValue("fabrics[1].nodeID", iter_0.GetValue().nodeID, - mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckValue("fabrics[1].fabricIndex", iter_0.GetValue().fabricIndex, 2U)); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 2)); - VerifyOrReturn(CheckValue("fabrics[2].nodeID", iter_0.GetValue().nodeID, - mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[2].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckValue("fabrics[2].fabricIndex", iter_0.GetValue().fabricIndex, 3U)); - VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 3)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValue("fabrics[0].nodeID", iter_0.GetValue().nodeID, - mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckValue("fabrics[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); - VerifyOrReturn(CheckValue("fabrics[1].nodeID", iter_0.GetValue().nodeID, - mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckValue("fabrics[1].fabricIndex", iter_0.GetValue().fabricIndex, 3U)); - VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 2)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - 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)); - shouldContinue = true; - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValue("fabrics[0].nodeID", iter_0.GetValue().nodeID, - mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckValue("fabrics[0].fabricIndex", iter_0.GetValue().fabricIndex, 1U)); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); - VerifyOrReturn(CheckValue("fabrics[1].nodeID", iter_0.GetValue().nodeID, - mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckValue("fabrics[1].fabricIndex", iter_0.GetValue().fabricIndex, 4U)); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 2)); - VerifyOrReturn(CheckValue("fabrics[2].nodeID", iter_0.GetValue().nodeID, - mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[2].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckValue("fabrics[2].fabricIndex", iter_0.GetValue().fabricIndex, 3U)); - VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 3)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Precondition: Reset Devices to factory defaults"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; - return FactoryReset(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Precondition: Reset Devices to factory defaults"); - 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("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); - } - case 2: { - LogStep(2, "TH_CR1 starts a commissioning process with DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "TH_CR1 opens a commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Waiting after opening commissioning window"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "TH_CR2 starts a commissioning process with DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 6: { - LogStep(6, "DUT_CE is commissioned to TH_CR2"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - return WaitForCommissionee(kIdentityBeta, value); - } - case 7: { - LogStep(7, "TH_CR1 opens a commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 8: { - LogStep(8, "Waiting after opening commissioning window"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 9: { - LogStep(9, "TH_CR3 Commissions with DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityGamma, value); - } - case 10: { - LogStep(10, "DUT_CE is commissioned to TH_CR3"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; - return WaitForCommissionee(kIdentityGamma, value); - } - case 11: { - LogStep(11, "TH_CR2 reads the list of Fabrics on DUT_CE"); - VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); - } - case 12: { - LogStep(12, "TH_CR2 sends RemoveFabric with FabricIndex = 2 command to DUT_CE"); - VerifyOrDo(!ShouldSkip("OPCREDS.S.C0a.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type value; - value.fabricIndex = 2U; - return SendCommand(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Commands::RemoveFabric::Id, value, chip::Optional(10000), - chip::NullOptional - - ); - } - case 13: { - LogStep(13, "TH_CR2 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("chiptestgarbage: not in length on purpose", 8); - return WriteAttribute(kIdentityBeta, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 14: { - LogStep(14, "TH_CR2 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0005 && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 15: { - LogStep(15, "TH_CR1 reads the list of Fabrics on DUT_CE"); - VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); - } - case 16: { - LogStep(16, "TH_CR1 opens a commissioning window on DUT_CE using BCM"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 17: { - LogStep(17, "Waiting after opening commissioning window"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 18: { - LogStep(18, "TH_CR2 starts a commissioning process with DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 19: { - LogStep(19, "DUT_CE is commissioned to TH_CR2"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - return WaitForCommissionee(kIdentityBeta, value); - } - case 20: { - LogStep(20, "TH_CR1 reads the list of Fabrics on DUT_CE"); - VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CADMIN_1_17Suite : public TestCommand -{ -public: - Test_TC_CADMIN_1_17Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_17", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_CADMIN_1_17Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - 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_CADMIN_1_18Suite : public TestCommand -{ -public: - Test_TC_CADMIN_1_18Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_18", 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_CADMIN_1_18Suite() {} - - 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_CADMIN_1_19Suite : public TestCommand -{ -public: - Test_TC_CADMIN_1_19Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_19", 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_CADMIN_1_19Suite() {} - - 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_CADMIN_1_20Suite : public TestCommand -{ -public: - Test_TC_CADMIN_1_20Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_20", 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_CADMIN_1_20Suite() {} - - 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_CADMIN_1_21Suite : public TestCommand -{ -public: - Test_TC_CADMIN_1_21Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_21", 8, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); - } - - ~Test_TC_CADMIN_1_21Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(950)); } - -private: - chip::Optional mNodeId; - chip::Optional mTimeout; - chip::Optional mEndpoint; - chip::Optional mDiscriminator; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("windowStatus", value, 0U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("windowStatus", value, 0U)); - } - 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, "Precondition: Reset Devices to factory defaults"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; - return FactoryReset(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Precondition: Reset Devices to factory defaults"); - 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("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); - } - case 2: { - LogStep(2, "TH_CR1 starts a commissioning process with DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "TH_CR1 opens a commissioning window on DUT_CE using BCM"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 900U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Wait for commissioning Window to 901 seconds"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 901000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "TH_CR1 reads the window status to verify the DUT_CE window is closed"); - VerifyOrDo(!ShouldSkip("CADMIN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "TH_CR1 opens a commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 901U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 7: { - LogStep(7, "TH_CR1 reads the window status to verify the DUT_CE window is closed"); - VerifyOrDo(!ShouldSkip("CADMIN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CADMIN_1_22Suite : public TestCommand -{ -public: - Test_TC_CADMIN_1_22Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_22", 8, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); - AddArgument("PakeVerifier", &mPakeVerifier); - } - - ~Test_TC_CADMIN_1_22Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(950)); } - -private: - chip::Optional mNodeId; - chip::Optional mTimeout; - chip::Optional mEndpoint; - chip::Optional mDiscriminator; - chip::Optional mPakeVerifier; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("windowStatus", value, 0U)); - } - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("windowStatus", value, 0U)); - } - 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, "Precondition: Reset Devices to factory defaults"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; - return FactoryReset(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Precondition: Reset Devices to factory defaults"); - 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("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); - } - case 2: { - LogStep(2, "TH_CR1 starts a commissioning process with DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "TH_CR1 opens a commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 900U; - value.PAKEPasscodeVerifier = mPakeVerifier.HasValue() - ? mPakeVerifier.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\xb9\x61\x70\xaa\xe8\x03\x34\x68\x84\x72\x4f\xe9\xa3\xb2\x87\xc3\x03\x30\xc2\xa6\x60\x37\x5d\x17\xbb\x20" - "\x5a\x8c\xf1\xae\xcb\x35\x04\x57\xf8\xab\x79\xee\x25\x3a\xb6\xa8\xe4\x6b\xb0\x9e\x54\x3a\xe4\x22\x73\x6d" - "\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51" - "\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf"), - 97); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Wait for commissioning Window to 901 seconds"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 901000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "TH_CR1 reads the window status to verify the DUT_CE window is closed"); - VerifyOrDo(!ShouldSkip("CADMIN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, "TH_CR1 opens a commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 901U; - value.PAKEPasscodeVerifier = mPakeVerifier.HasValue() - ? mPakeVerifier.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\xb9\x61\x70\xaa\xe8\x03\x34\x68\x84\x72\x4f\xe9\xa3\xb2\x87\xc3\x03\x30\xc2\xa6\x60\x37\x5d\x17\xbb\x20" - "\x5a\x8c\xf1\xae\xcb\x35\x04\x57\xf8\xab\x79\xee\x25\x3a\xb6\xa8\xe4\x6b\xb0\x9e\x54\x3a\xe4\x22\x73\x6d" - "\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51" - "\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf"), - 97); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 7: { - LogStep(7, "TH_CR1 reads the window status to verify the DUT_CE window is closed"); - VerifyOrDo(!ShouldSkip("CADMIN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CADMIN_1_3Suite : public TestCommand -{ -public: - Test_TC_CADMIN_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CADMIN_1_3", 23, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); - AddArgument("payload", &mPayload); - AddArgument("PakeVerifier", &mPakeVerifier); - AddArgument("waitAfterCommissioning", 0, UINT16_MAX, &mWaitAfterCommissioning); - } - - ~Test_TC_CADMIN_1_3Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(300)); } - -private: - chip::Optional mNodeId; - chip::Optional mTimeout; - chip::Optional mNodeId2; - chip::Optional mEndpoint; - chip::Optional mDiscriminator; - chip::Optional mPayload; - chip::Optional mPakeVerifier; - chip::Optional mWaitAfterCommissioning; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("chiptest", 8))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValue("fabrics[0].nodeID", iter_0.GetValue().nodeID, - mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); - VerifyOrReturn(CheckValue("fabrics[1].nodeID", iter_0.GetValue().nodeID, - mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 2)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValue("fabrics[0].nodeID", iter_0.GetValue().nodeID, - mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); - VerifyOrReturn(CheckValue("fabrics[1].nodeID", iter_0.GetValue().nodeID, - mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 2)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("chiptest1", 9))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("chiptest2", 9))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("windowStatus", value, 0U)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - 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), EMBER_ZCL_STATUS_FAILURE)); - VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.HasValue(), true)); - VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.Value(), 9)); - 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, "Precondition: Reset Devices to factory defaults"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; - return FactoryReset(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Precondition: Reset Devices to factory defaults"); - 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("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); - } - case 2: { - LogStep(2, "TH_CR1 starts a commissioning process with DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "TH_CR1 opens a commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - value.PAKEPasscodeVerifier = mPakeVerifier.HasValue() - ? mPakeVerifier.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\xb9\x61\x70\xaa\xe8\x03\x34\x68\x84\x72\x4f\xe9\xa3\xb2\x87\xc3\x03\x30\xc2\xa6\x60\x37\x5d\x17\xbb\x20" - "\x5a\x8c\xf1\xae\xcb\x35\x04\x57\xf8\xab\x79\xee\x25\x3a\xb6\xa8\xe4\x6b\xb0\x9e\x54\x3a\xe4\x22\x73\x6d" - "\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51" - "\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf"), - 97); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Waiting after opening commissioning window"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Verify that the DNS-SD advertisement shows CM=2"); - 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_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("chiptestgarbage: not in length on purpose", 8); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 7: { - LogStep(7, "TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - true, chip::NullOptional); - } - case 8: { - LogStep(8, "TH_CR2 starts a commissioning process with DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 9: { - LogStep(9, "DUT_CE is commissioned by TH_CR2 on Fabric ID2"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - return WaitForCommissionee(kIdentityBeta, value); - } - case 10: { - LogStep(10, "Verify DUT_CE is now discoverable over DNS-SD with two SRV Records"); - 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 11: { - LogStep(11, "TH_CR1 reads the list of Fabrics on DUT_CE"); - VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); - } - case 12: { - LogStep(12, "TH_CR2 reads the list of Fabrics on DUT_CE"); - VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); - } - case 13: { - LogStep(13, "TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("chiptest1garbage: not in length on purpose", 9); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 14: { - LogStep(14, "TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - true, chip::NullOptional); - } - case 15: { - LogStep(15, "TH_CR2 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("chiptest2garbage: not in length on purpose", 9); - return WriteAttribute(kIdentityBeta, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 16: { - LogStep(16, "TH_CR2 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityBeta, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - true, chip::NullOptional); - } - case 17: { - LogStep(17, "TH_CR2 opens a commissioning window on DUT_CE using ECM"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - value.PAKEPasscodeVerifier = mPakeVerifier.HasValue() - ? mPakeVerifier.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\xb9\x61\x70\xaa\xe8\x03\x34\x68\x84\x72\x4f\xe9\xa3\xb2\x87\xc3\x03\x30\xc2\xa6\x60\x37\x5d\x17\xbb\x20" - "\x5a\x8c\xf1\xae\xcb\x35\x04\x57\xf8\xab\x79\xee\x25\x3a\xb6\xa8\xe4\x6b\xb0\x9e\x54\x3a\xe4\x22\x73\x6d" - "\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51" - "\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf"), - 97); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); - return SendCommand(kIdentityBeta, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 18: { - LogStep(18, "Wait for the commissioning window in step 13 to timeout"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 180000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 19: { - LogStep(19, "TH_CR2 reads the window status to verify the DUT_CE window is closed"); - VerifyOrDo(!ShouldSkip("CADMIN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); - } - case 20: { - LogStep(20, "TH_CR2 opens a commissioning window on DUT_CE using ECM"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - value.PAKEPasscodeVerifier = mPakeVerifier.HasValue() - ? mPakeVerifier.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\xb9\x61\x70\xaa\xe8\x03\x34\x68\x84\x72\x4f\xe9\xa3\xb2\x87\xc3\x03\x30\xc2\xa6\x60\x37\x5d\x17\xbb\x20" - "\x5a\x8c\xf1\xae\xcb\x35\x04\x57\xf8\xab\x79\xee\x25\x3a\xb6\xa8\xe4\x6b\xb0\x9e\x54\x3a\xe4\x22\x73\x6d" - "\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51" - "\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf"), - 97); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); - return SendCommand(kIdentityBeta, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 21: { - LogStep(21, "Waiting after opening commissioning window"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 22: { - LogStep(22, "TH_CR1 starts a commissioning process with DUT_CE before the timeout from step 12"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_CADMIN_1_4Suite : public TestCommand -{ -public: - Test_TC_CADMIN_1_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CADMIN_1_4", 23, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); - AddArgument("payload", &mPayload); - AddArgument("waitAfterCommissioning", 0, UINT16_MAX, &mWaitAfterCommissioning); - } - - ~Test_TC_CADMIN_1_4Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(300)); } - -private: - chip::Optional mNodeId; - chip::Optional mTimeout; - chip::Optional mNodeId2; - chip::Optional mEndpoint; - chip::Optional mDiscriminator; - chip::Optional mPayload; - chip::Optional mWaitAfterCommissioning; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); - } - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValue("fabrics[0].nodeID", iter_0.GetValue().nodeID, - mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); - VerifyOrReturn(CheckValue("fabrics[1].nodeID", iter_0.GetValue().nodeID, - mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 2)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValue("fabrics[0].nodeID", iter_0.GetValue().nodeID, - mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); - VerifyOrReturn(CheckValue("fabrics[1].nodeID", iter_0.GetValue().nodeID, - mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 2)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("chiptest", 8))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); - } - break; - case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::CharSpan value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("chiptest", 8))); - VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); - VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); - } - break; - case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("windowStatus", value, 0U)); - } - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - 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), EMBER_ZCL_STATUS_FAILURE)); - VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.HasValue(), true)); - VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.Value(), 9)); - shouldContinue = true; - break; + + 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)); } @@ -100116,238 +97535,32 @@ class Test_TC_CADMIN_1_4Suite : public TestCommand { using namespace chip::app::Clusters; switch (testIndex) - { - case 0: { - LogStep(0, "Precondition: Reset Devices to factory defaults"); - VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::SystemCommands::Commands::FactoryReset::Type value; - return FactoryReset(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Precondition: Reset Devices to factory defaults"); - 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("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); - } - case 2: { - LogStep(2, "TH_CR1 starts a commissioning process with DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 3: { - LogStep(3, "TH_CR1 opens a commissioning window on DUT_CE using BCM"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Waiting after opening commissioning window"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Verify that the DNS-SD advertisement shows CM=1"); - 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_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("chiptestgarbage: not in length on purpose", 8); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 7: { - LogStep(7, "TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - true, chip::NullOptional); - } - case 8: { - LogStep(8, "TH_CR2 starts a commissioning process with DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 9: { - LogStep(9, "DUT_CE is commissioned by TH_CR2 on Fabric ID2 "); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - return WaitForCommissionee(kIdentityBeta, value); - } - case 10: { - LogStep(10, "Verify DUT_CE is now discoverable over DNS-SD with two SRV Records"); - 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 11: { - LogStep(11, "TH_CR1 reads the list of Fabrics on DUT_CE"); - VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); - } - case 12: { - LogStep(12, "TH_CR2 reads the list of Fabrics on DUT_CE"); - VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); - } - case 13: { - LogStep(13, "TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("chiptestgarbage: not in length on purpose", 8); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 14: { - LogStep(14, "TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - true, chip::NullOptional); - } - case 15: { - LogStep(15, "TH_CR2 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("chiptestgarbage: not in length on purpose", 8); - return WriteAttribute(kIdentityBeta, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 16: { - LogStep(16, "TH_CR2 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityBeta, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - true, chip::NullOptional); - } - case 17: { - LogStep(17, "TH_CR2 opens a commissioning window on DUT_CE using BCM"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityBeta, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 18: { - LogStep(18, "Wait for the commissioning window in step 13 to timeout"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 180000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 19: { - LogStep(19, "TH_CR2 reads the window status to verify the DUT_CE window is closed"); - VerifyOrDo(!ShouldSkip("CADMIN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); - } - case 20: { - LogStep(20, "TH_CR2 opens a commissioning window on DUT_CE using BCM"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityBeta, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 21: { - LogStep(21, "Waiting after opening commissioning window"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 22: { - LogStep(22, "TH_CR1 starts a commissioning process with DUT_CE before the timeout from step 12"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityAlpha, value); - } - } + {} return CHIP_NO_ERROR; } }; -class Test_TC_CADMIN_1_5Suite : public TestCommand +class Test_TC_CADMIN_1_21Suite : public TestCommand { public: - Test_TC_CADMIN_1_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CADMIN_1_5", 22, credsIssuerConfig) + Test_TC_CADMIN_1_21Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_CADMIN_1_21", 8, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("nodeIdForDuplicateCommissioning", 0, UINT64_MAX, &mNodeIdForDuplicateCommissioning); - AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); - AddArgument("nodeId3", 0, UINT64_MAX, &mNodeId3); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("waitAfterCommissioning", 0, UINT16_MAX, &mWaitAfterCommissioning); AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); - AddArgument("payload", &mPayload); - AddArgument("PakeVerifier", &mPakeVerifier); - AddArgument("IncorrectPakeVerifier", &mIncorrectPakeVerifier); } - ~Test_TC_CADMIN_1_5Suite() {} + ~Test_TC_CADMIN_1_21Suite() {} - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(300)); } + chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(950)); } private: chip::Optional mNodeId; chip::Optional mTimeout; - chip::Optional mNodeIdForDuplicateCommissioning; - chip::Optional mNodeId2; - chip::Optional mNodeId3; chip::Optional mEndpoint; - chip::Optional mWaitAfterCommissioning; chip::Optional mDiscriminator; - chip::Optional mPayload; - chip::Optional mPakeVerifier; - chip::Optional mIncorrectPakeVerifier; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -100382,74 +97595,23 @@ class Test_TC_CADMIN_1_5Suite : public TestCommand break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("windowStatus", value, 0U)); + } break; case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::CharSpan value; + chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("chiptest", 8))); + VerifyOrReturn(CheckValue("windowStatus", value, 0U)); } break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.HasValue(), true)); - VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.Value(), 3)); - 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), EMBER_ZCL_STATUS_FAILURE)); - VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.HasValue(), true)); - VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.Value(), 2)); - break; - case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.HasValue(), true)); - VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.Value(), 4)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -100492,282 +97654,76 @@ class Test_TC_CADMIN_1_5Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 3: { - LogStep(3, "TH_CR1 opens a new commissioning window on DUT_CE using ECM"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "TH_CR1 opens a commissioning window on DUT_CE using BCM"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - value.PAKEPasscodeVerifier = mPakeVerifier.HasValue() - ? mPakeVerifier.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\xb9\x61\x70\xaa\xe8\x03\x34\x68\x84\x72\x4f\xe9\xa3\xb2\x87\xc3\x03\x30\xc2\xa6\x60\x37\x5d\x17\xbb\x20" - "\x5a\x8c\xf1\xae\xcb\x35\x04\x57\xf8\xab\x79\xee\x25\x3a\xb6\xa8\xe4\x6b\xb0\x9e\x54\x3a\xe4\x22\x73\x6d" - "\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51" - "\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf"), - 97); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; + value.commissioningTimeout = 900U; return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, + AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, chip::Optional(10000), chip::NullOptional ); } case 4: { - LogStep(4, "Verify that the DNS-SD advertisement shows CM=2"); - 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 5: { - LogStep(5, "Wait for PIXIT.CADMIN.CwDuration + 10 seconds"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 190000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "TH_CR2 starts a commissioning process with DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 7: { - LogStep(7, "TH_CR1 opens a new commissioning window on DUT_CE using ECM"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - value.PAKEPasscodeVerifier = mPakeVerifier.HasValue() - ? mPakeVerifier.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\xb9\x61\x70\xaa\xe8\x03\x34\x68\x84\x72\x4f\xe9\xa3\xb2\x87\xc3\x03\x30\xc2\xa6\x60\x37\x5d\x17\xbb\x20" - "\x5a\x8c\xf1\xae\xcb\x35\x04\x57\xf8\xab\x79\xee\x25\x3a\xb6\xa8\xe4\x6b\xb0\x9e\x54\x3a\xe4\x22\x73\x6d" - "\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51" - "\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf"), - 97); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 8: { - LogStep(8, "Waiting after opening commissioning window"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 9: { - LogStep(9, "TH_CR1 revokes the commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::RevokeCommissioning::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 10: { - LogStep(10, "TH_CR2 starts a commissioning process with DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 11: { - LogStep(11, "TH_CR1 revokes the commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::RevokeCommissioning::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 12: { - LogStep(12, "TH_CR1 writes the mandatory attribute NodeLabel of DUT_CE"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("chiptestgarbage: not in length on purpose", 8); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - value, chip::NullOptional, chip::NullOptional); - } - case 13: { - LogStep(13, "TH_CR1 read the mandatory attribute NodeLabel of DUT_CE"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - true, chip::NullOptional); - } - case 14: { - LogStep(14, "TH_CR1 opens a new commissioning window on DUT_CE using wrong PakeVerifier value using ECM"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - value.PAKEPasscodeVerifier = mIncorrectPakeVerifier.HasValue() - ? mIncorrectPakeVerifier.Value() - : chip::ByteSpan(chip::Uint8::from_const_char( - "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b" - "\x4d\xc3\xf1\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2" - "\xb4\xae\x30\xcd\xf2\xfd\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19" - "\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a"), - 89); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 15: { - LogStep(15, "TH_CR1 opens a new commissioning window on DUT_CE using ECM"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - value.PAKEPasscodeVerifier = mPakeVerifier.HasValue() - ? mPakeVerifier.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\xb9\x61\x70\xaa\xe8\x03\x34\x68\x84\x72\x4f\xe9\xa3\xb2\x87\xc3\x03\x30\xc2\xa6\x60\x37\x5d\x17\xbb\x20" - "\x5a\x8c\xf1\xae\xcb\x35\x04\x57\xf8\xab\x79\xee\x25\x3a\xb6\xa8\xe4\x6b\xb0\x9e\x54\x3a\xe4\x22\x73\x6d" - "\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51" - "\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf"), - 97); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 16: { - LogStep(16, "Waiting after opening commissioning window"); + LogStep(4, "Wait for commissioning Window to 901 seconds"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; + value.ms = 901000UL; return WaitForMs(kIdentityAlpha, value); } - case 17: { - LogStep(17, "TH_CR1 opens another commissioning window on DUT_CE using ECM"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - value.PAKEPasscodeVerifier = mPakeVerifier.HasValue() - ? mPakeVerifier.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\xb9\x61\x70\xaa\xe8\x03\x34\x68\x84\x72\x4f\xe9\xa3\xb2\x87\xc3\x03\x30\xc2\xa6\x60\x37\x5d\x17\xbb\x20" - "\x5a\x8c\xf1\xae\xcb\x35\x04\x57\xf8\xab\x79\xee\x25\x3a\xb6\xa8\xe4\x6b\xb0\x9e\x54\x3a\xe4\x22\x73\x6d" - "\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51" - "\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf"), - 97); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 18: { - LogStep(18, "TH_CR2 starts a commissioning process with DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 19: { - LogStep(19, "DUT_CE is commissioned by TH_CR2"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - return WaitForCommissionee(kIdentityBeta, value); + case 5: { + LogStep(5, "TH_CR1 reads the window status to verify the DUT_CE window is closed"); + VerifyOrDo(!ShouldSkip("CADMIN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); } - case 20: { - LogStep(20, "TH_CR1 tries to revoke the commissioning window on DUT_CE using RevokeCommissioning command"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 6: { + LogStep(6, "TH_CR1 opens a commissioning window on DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type value; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; + value.commissioningTimeout = 901U; return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::RevokeCommissioning::Id, value, + AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, chip::Optional(10000), chip::NullOptional ); } - case 21: { - LogStep(21, "TH_CR3 starts a commissioning process with DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityGamma, value); + case 7: { + LogStep(7, "TH_CR1 reads the window status to verify the DUT_CE window is closed"); + VerifyOrDo(!ShouldSkip("CADMIN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); } } return CHIP_NO_ERROR; } }; -class Test_TC_CADMIN_1_6Suite : public TestCommand +class Test_TC_CADMIN_1_22Suite : public TestCommand { public: - Test_TC_CADMIN_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CADMIN_1_6", 21, credsIssuerConfig) + Test_TC_CADMIN_1_22Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_CADMIN_1_22", 10, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("nodeIdForDuplicateCommissioning", 0, UINT64_MAX, &mNodeIdForDuplicateCommissioning); - AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); - AddArgument("nodeId3", 0, UINT64_MAX, &mNodeId3); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("waitAfterCommissioning", 0, UINT16_MAX, &mWaitAfterCommissioning); AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); - AddArgument("payload", &mPayload); + AddArgument("PakeVerifier", &mPakeVerifier); } - ~Test_TC_CADMIN_1_6Suite() {} + ~Test_TC_CADMIN_1_22Suite() {} - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(300)); } + chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(950)); } private: chip::Optional mNodeId; chip::Optional mTimeout; - chip::Optional mNodeIdForDuplicateCommissioning; - chip::Optional mNodeId2; - chip::Optional mNodeId3; chip::Optional mEndpoint; - chip::Optional mWaitAfterCommissioning; chip::Optional mDiscriminator; - chip::Optional mPayload; + chip::Optional mPakeVerifier; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -100795,76 +97751,38 @@ class Test_TC_CADMIN_1_6Suite : public TestCommand break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("windowStatus", value, 0U)); + } break; case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::CharSpan value; + chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("chiptest", 8))); + VerifyOrReturn(CheckValue("windowStatus", value, 0U)); } break; - case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - 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), EMBER_ZCL_STATUS_FAILURE)); - VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.HasValue(), true)); - VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.Value(), 2)); - 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)); - shouldContinue = true; - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.HasValue(), true)); - VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.Value(), 4)); - break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -100900,220 +97818,188 @@ class Test_TC_CADMIN_1_6Suite : public TestCommand } case 2: { LogStep(2, "TH_CR1 starts a commissioning process with DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee(kIdentityAlpha, value); } case 3: { - LogStep(3, "TH_CR1 opens a commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 4: { - LogStep(4, "Verify that the DNS-SD advertisement shows CM=1"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "TH_CR1 opens a commissioning window on DUT_CE using ECM with a value of 900 seconds"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp"), 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.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 5: { - LogStep(5, "Wait for PIXIT.CADMIN.CwDuration + 10"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 190000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 6: { - LogStep(6, "TH_CR2 starts a commissioning process with DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 7: { - LogStep(7, "TH_CR1 opens a commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 4: { + LogStep(4, "TH_CR1 opens a commissioning window on DUT_CE using ECM with a value of 900 seconds"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; + value.commissioningTimeout = 900U; + value.PAKEPasscodeVerifier = mPakeVerifier.HasValue() + ? mPakeVerifier.Value() + : chip::ByteSpan( + chip::Uint8::from_const_char( + "\xb9\x61\x70\xaa\xe8\x03\x34\x68\x84\x72\x4f\xe9\xa3\xb2\x87\xc3\x03\x30\xc2\xa6\x60\x37\x5d\x17\xbb\x20" + "\x5a\x8c\xf1\xae\xcb\x35\x04\x57\xf8\xab\x79\xee\x25\x3a\xb6\xa8\xe4\x6b\xb0\x9e\x54\x3a\xe4\x22\x73\x6d" + "\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51" + "\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf"), + 97); + value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; + value.iterations = 1000UL; + value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, + AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, chip::Optional(10000), chip::NullOptional ); } - case 8: { - LogStep(8, "Waiting after opening commissioning window"); + case 5: { + LogStep(5, "Wait for commissioning Window to 901 seconds"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; + value.ms = 901000UL; return WaitForMs(kIdentityAlpha, value); } - case 9: { - LogStep(9, "TH_CR1 revokes the commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::RevokeCommissioning::Id, value, - chip::Optional(10000), chip::NullOptional - - ); + case 6: { + LogStep(6, "TH_CR1 reads the window status to verify the DUT_CE window is closed"); + VerifyOrDo(!ShouldSkip("CADMIN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); } - case 10: { - LogStep(10, "TH_CR2 starts a commissioning process with DUT_CE"); + case 7: { + LogStep(7, "TH_CR1 opens a commissioning window on DUT_CE using ECM with a value of 901 seconds"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityBeta, value); + 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 11: { - LogStep(11, "TH_CR1 revokes the commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 8: { + LogStep(8, "TH_CR1 opens a commissioning window on DUT_CE using ECM with a value of 901 seconds"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type value; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; + value.commissioningTimeout = 901U; + value.PAKEPasscodeVerifier = mPakeVerifier.HasValue() + ? mPakeVerifier.Value() + : chip::ByteSpan( + chip::Uint8::from_const_char( + "\xb9\x61\x70\xaa\xe8\x03\x34\x68\x84\x72\x4f\xe9\xa3\xb2\x87\xc3\x03\x30\xc2\xa6\x60\x37\x5d\x17\xbb\x20" + "\x5a\x8c\xf1\xae\xcb\x35\x04\x57\xf8\xab\x79\xee\x25\x3a\xb6\xa8\xe4\x6b\xb0\x9e\x54\x3a\xe4\x22\x73\x6d" + "\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51" + "\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf"), + 97); + value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; + value.iterations = 1000UL; + value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::RevokeCommissioning::Id, value, + AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, chip::Optional(10000), chip::NullOptional ); } - case 12: { - LogStep(12, "TH_CR1 writes the mandatory attribute NodeLabel of DUT_CE"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::CharSpan value; - value = chip::Span("chiptestgarbage: not in length on purpose", 8); - return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - value, chip::NullOptional, chip::NullOptional); + case 9: { + LogStep(9, "TH_CR1 reads the window status to verify the DUT_CE window is closed"); + VerifyOrDo(!ShouldSkip("CADMIN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "TH_CR1 read the mandatory attribute NodeLabel of DUT_CE"); - VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, - true, chip::NullOptional); } - case 14: { - LogStep(14, "TH_CR1 opens a commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional + return CHIP_NO_ERROR; + } +}; - ); - } - case 15: { - LogStep(15, "Waiting after opening commissioning window"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 16: { - LogStep(16, "TH_CR1 opens another commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional +class Test_TC_CADMIN_1_3Suite : public TestCommand +{ +public: + Test_TC_CADMIN_1_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CADMIN_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); + } - ); - } - case 17: { - LogStep(17, "TH_CR2 starts a commissioning process on DUT_CE"); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 18: { - LogStep(18, "DUT_CE is commissioned by TH_CR2"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - return WaitForCommissionee(kIdentityBeta, value); - } - case 19: { - LogStep(19, "TH_CR1 tries to revoke the commissioning window on DUT_CE using RevokeCommissioning command"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type value; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::RevokeCommissioning::Id, value, - chip::Optional(10000), chip::NullOptional + ~Test_TC_CADMIN_1_3Suite() {} - ); - } - case 20: { - LogStep(20, "TH_CR3 starts a commissioning process with DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityGamma, value); + 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_CADMIN_1_9Suite : public TestCommand +class Test_TC_CADMIN_1_4Suite : public TestCommand { public: - Test_TC_CADMIN_1_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CADMIN_1_9", 28, credsIssuerConfig) + Test_TC_CADMIN_1_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CADMIN_1_4", 27, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - AddArgument("nodeIdForDuplicateCommissioning", 0, UINT64_MAX, &mNodeIdForDuplicateCommissioning); AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); - AddArgument("nodeId3", 0, UINT64_MAX, &mNodeId3); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("waitAfterCommissioning", 0, UINT16_MAX, &mWaitAfterCommissioning); AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); - AddArgument("correctPayload", &mCorrectPayload); - AddArgument("incorrectSetupCodePayload", &mIncorrectSetupCodePayload); - AddArgument("PakeVerifier", &mPakeVerifier); + AddArgument("payload", &mPayload); + AddArgument("waitAfterCommissioning", 0, UINT16_MAX, &mWaitAfterCommissioning); } - ~Test_TC_CADMIN_1_9Suite() {} + ~Test_TC_CADMIN_1_4Suite() {} - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(700)); } + chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(300)); } private: chip::Optional mNodeId; chip::Optional mTimeout; - chip::Optional mNodeIdForDuplicateCommissioning; chip::Optional mNodeId2; - chip::Optional mNodeId3; chip::Optional mEndpoint; - chip::Optional mWaitAfterCommissioning; chip::Optional mDiscriminator; - chip::Optional mCorrectPayload; - chip::Optional mIncorrectSetupCodePayload; - chip::Optional mPakeVerifier; + chip::Optional mPayload; + chip::Optional mWaitAfterCommissioning; + + uint8_t TH1FabricIndex; + uint8_t TH2FabricIndex; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -101141,102 +98027,166 @@ class Test_TC_CADMIN_1_9Suite : public TestCommand break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + TH1FabricIndex = value; + } break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::CharSpan value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); + } break; case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + TH2FabricIndex = value; + } break; case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); + VerifyOrReturn(CheckValue("fabrics[0].nodeID", iter_0.GetValue().nodeID, + mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); + VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckValue("fabrics[0].fabricIndex", iter_0.GetValue().fabricIndex, TH1FabricIndex)); + VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); + VerifyOrReturn(CheckValue("fabrics[1].nodeID", iter_0.GetValue().nodeID, + mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); + VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckValue("fabrics[1].fabricIndex", iter_0.GetValue().fabricIndex, TH2FabricIndex)); + VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 2)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } break; case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList< + chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); + VerifyOrReturn(CheckValue("fabrics[0].nodeID", iter_0.GetValue().nodeID, + mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); + VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckValue("fabrics[0].fabricIndex", iter_0.GetValue().fabricIndex, TH1FabricIndex)); + VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); + VerifyOrReturn(CheckValue("fabrics[1].nodeID", iter_0.GetValue().nodeID, + mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); + VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); + VerifyOrReturn(CheckValue("fabrics[1].fabricIndex", iter_0.GetValue().fabricIndex, TH2FabricIndex)); + VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 2)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } break; case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::CharSpan value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("chiptest", 8))); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); + } break; case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::CharSpan value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("chiptest", 8))); + VerifyOrReturn(CheckConstraintType("value", "char_string", "char_string")); + VerifyOrReturn(CheckConstraintMaxLength("value", value, 32)); + } break; case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("windowStatus", value, 0U)); + } break; case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.HasValue(), true)); + VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.Value(), 9)); shouldContinue = true; break; case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + } break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); @@ -101280,38 +98230,31 @@ class Test_TC_CADMIN_1_9Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 3: { - LogStep(3, "TH_CR1 opens a new commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "TH1 reads CurrentFabricIndex attribute and save it for future use."); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "TH_CR1 opens a commissioning window on DUT_CE using BCM"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 900U; - value.PAKEPasscodeVerifier = mPakeVerifier.HasValue() - ? mPakeVerifier.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\x06\xc7\x56\xdf\xfc\xd7\x22\x65\x34\x52\xa1\x2d\xcd\x94\x5d\x8c\x54\xda\x2b\x0f\x3c\xbd\x1b\x4d\xc3\xf1" - "\xad\xb2\x23\xae\xb2\x6b\x04\x7c\xd2\x4c\x96\x86\x6f\x97\x9b\x1d\x83\xec\x50\xe2\xb4\xae\x30\xcd\xf2\xfd" - "\xb3\x2b\xd8\xa2\x11\xb8\x37\xdc\x94\xed\xcd\x56\xf4\xd1\x43\x77\x19\x10\x76\xbf\xc5\x9d\x99\xb7\xdd\x30" - "\x53\xef\xd6\xf0\x2c\x44\x34\xf2\xbd\xd2\x7a\xa4\xf9\xce\xa7\x0d\x73\x8e\x4c"), - 97); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; + value.commissioningTimeout = 180U; return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, + AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, chip::Optional(10000), chip::NullOptional ); } - case 4: { - LogStep(4, "Waiting after opening commissioning window"); + case 5: { + LogStep(5, "Waiting after opening commissioning window"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; return WaitForMs(kIdentityAlpha, value); } - case 5: { - LogStep(5, "Verify that the DNS-SD advertisement shows CM=2"); + case 6: { + LogStep(6, "Verify that the DNS-SD advertisement shows CM=1"); VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -101320,276 +98263,235 @@ class Test_TC_CADMIN_1_9Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } - case 6: { - LogStep(6, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - value.discoverOnce.Emplace(); - value.discoverOnce.Value() = true; - return PairWithCode(kIdentityBeta, value); - } - case 7: { - LogStep(7, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - value.discoverOnce.Emplace(); - value.discoverOnce.Value() = true; - return PairWithCode(kIdentityBeta, value); + case 7: { + LogStep(7, "TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); + VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::CharSpan value; + value = chip::Span("chiptestgarbage: not in length on purpose", 8); + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, + value, chip::NullOptional, chip::NullOptional); } case 8: { - LogStep(8, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - value.discoverOnce.Emplace(); - value.discoverOnce.Value() = true; - return PairWithCode(kIdentityBeta, value); + LogStep(8, "TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); + VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, + true, chip::NullOptional); } case 9: { - LogStep(9, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + LogStep(9, "TH_CR2 starts a commissioning process with DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - value.discoverOnce.Emplace(); - value.discoverOnce.Value() = true; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); return PairWithCode(kIdentityBeta, value); } case 10: { - LogStep(10, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + LogStep(10, "DUT_CE is commissioned by TH_CR2 on Fabric ID2 "); VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - value.discoverOnce.Emplace(); - value.discoverOnce.Value() = true; - return PairWithCode(kIdentityBeta, value); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + return WaitForCommissionee(kIdentityBeta, value); } case 11: { - LogStep(11, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - value.discoverOnce.Emplace(); - value.discoverOnce.Value() = true; - return PairWithCode(kIdentityBeta, value); + LogStep(11, "TH2 reads CurrentFabricIndex attribute and save it for future use."); + return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); } case 12: { - LogStep(12, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "Verify DUT_CE is now discoverable over DNS-SD with two SRV Records"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - value.discoverOnce.Emplace(); - value.discoverOnce.Value() = true; - return PairWithCode(kIdentityBeta, value); + 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 13: { - LogStep(13, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - value.discoverOnce.Emplace(); - value.discoverOnce.Value() = true; - return PairWithCode(kIdentityBeta, value); + LogStep(13, "TH_CR1 reads the list of Fabrics on DUT_CE"); + VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); } case 14: { - LogStep(14, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - value.discoverOnce.Emplace(); - value.discoverOnce.Value() = true; - return PairWithCode(kIdentityBeta, value); + LogStep(14, "TH_CR2 reads the list of Fabrics on DUT_CE"); + VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); } case 15: { - LogStep(15, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(15, "TH_CR1 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); + VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - value.discoverOnce.Emplace(); - value.discoverOnce.Value() = true; - return PairWithCode(kIdentityBeta, value); + chip::CharSpan value; + value = chip::Span("chiptestgarbage: not in length on purpose", 8); + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, + value, chip::NullOptional, chip::NullOptional); } case 16: { - LogStep(16, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - value.discoverOnce.Emplace(); - value.discoverOnce.Value() = true; - return PairWithCode(kIdentityBeta, value); + LogStep(16, "TH_CR1 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); + VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, + true, chip::NullOptional); } case 17: { - LogStep(17, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(17, "TH_CR2 writes the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); + VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - value.discoverOnce.Emplace(); - value.discoverOnce.Value() = true; - return PairWithCode(kIdentityBeta, value); + chip::CharSpan value; + value = chip::Span("chiptestgarbage: not in length on purpose", 8); + return WriteAttribute(kIdentityBeta, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, + value, chip::NullOptional, chip::NullOptional); } case 18: { - LogStep(18, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - value.discoverOnce.Emplace(); - value.discoverOnce.Value() = true; - return PairWithCode(kIdentityBeta, value); + LogStep(18, "TH_CR2 reads the Basic Information Clusters NodeLabel mandatory attribute of DUT_CE"); + VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityBeta, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, + true, chip::NullOptional); } case 19: { - LogStep(19, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(19, "TH_CR2 opens a commissioning window on DUT_CE using BCM"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - value.discoverOnce.Emplace(); - value.discoverOnce.Value() = true; - return PairWithCode(kIdentityBeta, value); + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + return SendCommand(kIdentityBeta, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, + chip::Optional(10000), chip::NullOptional + + ); } case 20: { - LogStep(20, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(20, "Wait for the commissioning window in step 13 to timeout"); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - value.discoverOnce.Emplace(); - value.discoverOnce.Value() = true; - return PairWithCode(kIdentityBeta, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 180000UL; + return WaitForMs(kIdentityAlpha, value); } case 21: { - LogStep(21, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - value.discoverOnce.Emplace(); - value.discoverOnce.Value() = true; - return PairWithCode(kIdentityBeta, value); + LogStep(21, "TH_CR2 reads the window status to verify the DUT_CE window is closed"); + VerifyOrDo(!ShouldSkip("CADMIN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); } case 22: { - LogStep(22, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(22, "TH_CR2 opens a commissioning window on DUT_CE using BCM"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - value.discoverOnce.Emplace(); - value.discoverOnce.Value() = true; - return PairWithCode(kIdentityBeta, value); + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + return SendCommand(kIdentityBeta, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, + chip::Optional(10000), chip::NullOptional + + ); } case 23: { - LogStep(23, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(23, "Waiting after opening commissioning window"); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - value.discoverOnce.Emplace(); - value.discoverOnce.Value() = true; - return PairWithCode(kIdentityBeta, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; + return WaitForMs(kIdentityAlpha, value); } case 24: { - LogStep(24, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + LogStep(24, "TH_CR1 starts a commissioning process with DUT_CE before the timeout from step 12"); VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - value.discoverOnce.Emplace(); - value.discoverOnce.Value() = true; - return PairWithCode(kIdentityBeta, value); + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + return PairWithCode(kIdentityAlpha, value); } case 25: { - LogStep(25, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(25, "TH_CR2 revokes the commissioning window"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C02.Rsp && CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - value.discoverOnce.Emplace(); - value.discoverOnce.Value() = true; - return PairWithCode(kIdentityBeta, value); + chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type value; + return SendCommand(kIdentityBeta, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::RevokeCommissioning::Id, value, + chip::Optional(10000), chip::NullOptional + + ); } case 26: { - LogStep(26, "TH_CR2 starts a commissioning process with DUT_CE using valid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(26, "Remove TH2 FabricIndex"); + VerifyOrDo(!ShouldSkip("OPCREDS.S.C0a.Rsp && CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = - mCorrectPayload.HasValue() ? mCorrectPayload.Value() : chip::Span("MT:-24J0AFN00I31506010", 22); - return PairWithCode(kIdentityBeta, value); + chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type value; + value.fabricIndex = TH2FabricIndex; + return SendCommand(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Commands::RemoveFabric::Id, value, chip::Optional(10000), + chip::NullOptional + + ); } - case 27: { - LogStep(27, "TH_CR3 starts a commissioning process with DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; - value.payload = - mCorrectPayload.HasValue() ? mCorrectPayload.Value() : chip::Span("MT:-24J0AFN00I31506010", 22); - return PairWithCode(kIdentityGamma, value); } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_CADMIN_1_5Suite : public TestCommand +{ +public: + Test_TC_CADMIN_1_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CADMIN_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_CADMIN_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_CADMIN_1_10Suite : public TestCommand +class Test_TC_CADMIN_1_6Suite : public TestCommand { public: - Test_TC_CADMIN_1_10Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_10", 28, credsIssuerConfig) + Test_TC_CADMIN_1_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CADMIN_1_6", 23, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); @@ -101599,13 +98501,12 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("waitAfterCommissioning", 0, UINT16_MAX, &mWaitAfterCommissioning); AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); - AddArgument("correctPayload", &mCorrectPayload); - AddArgument("incorrectSetupCodePayload", &mIncorrectSetupCodePayload); + AddArgument("payload", &mPayload); } - ~Test_TC_CADMIN_1_10Suite() {} + ~Test_TC_CADMIN_1_6Suite() {} - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(700)); } + chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(300)); } private: chip::Optional mNodeId; @@ -101616,8 +98517,9 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mWaitAfterCommissioning; chip::Optional mDiscriminator; - chip::Optional mCorrectPayload; - chip::Optional mIncorrectSetupCodePayload; + chip::Optional mPayload; + + uint8_t TH2FabricIndex; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -101659,16 +98561,14 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand shouldContinue = true; break; case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); @@ -101676,71 +98576,61 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand break; case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; break; case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::CharSpan value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValueAsString("nodeLabel", value, chip::CharSpan("chiptest", 8))); + } break; case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.HasValue(), true)); + VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.Value(), 2)); break; case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + TH2FabricIndex = value; + } break; case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.HasValue(), true)); + VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.Value(), 4)); break; case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); shouldContinue = true; break; case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - shouldContinue = true; + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + } break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); @@ -101788,7 +98678,7 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 900U; + value.commissioningTimeout = 180U; return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, chip::Optional(10000), chip::NullOptional @@ -101796,14 +98686,7 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand ); } case 4: { - LogStep(4, "Waiting after opening commissioning window"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Verify that the DNS-SD advertisement shows CM=1"); + LogStep(4, "Verify that the DNS-SD advertisement shows CM=1"); VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; @@ -101812,235 +98695,235 @@ class Test_TC_CADMIN_1_10Suite : public TestCommand value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt(kIdentityAlpha, value); } + case 5: { + LogStep(5, "Wait for PIXIT.CADMIN.CwDuration + 10"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = 190000UL; + return WaitForMs(kIdentityAlpha, value); + } case 6: { - LogStep(6, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(6, "TH_CR2 starts a commissioning process with DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); return PairWithCode(kIdentityBeta, value); } case 7: { - LogStep(7, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "TH_CR1 opens a commissioning window on DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, + chip::Optional(10000), chip::NullOptional + + ); } case 8: { - LogStep(8, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "Waiting after opening commissioning window"); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; + return WaitForMs(kIdentityAlpha, value); } case 9: { - LogStep(9, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(9, "TH_CR1 revokes the commissioning window on DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); + chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::RevokeCommissioning::Id, value, + chip::Optional(10000), chip::NullOptional + + ); } case 10: { - LogStep(10, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(10, "TH_CR2 starts a commissioning process with DUT_CE"); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); return PairWithCode(kIdentityBeta, value); } case 11: { - LogStep(11, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "TH_CR1 revokes the commissioning window on DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); + chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::RevokeCommissioning::Id, value, + chip::Optional(10000), chip::NullOptional + + ); } case 12: { - LogStep(12, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(12, "TH_CR1 writes the mandatory attribute NodeLabel of DUT_CE"); + VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); + chip::CharSpan value; + value = chip::Span("chiptestgarbage: not in length on purpose", 8); + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, + value, chip::NullOptional, chip::NullOptional); } case 13: { - LogStep(13, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); + LogStep(13, "TH_CR1 read the mandatory attribute NodeLabel of DUT_CE"); + VerifyOrDo(!ShouldSkip("BINFO.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::NodeLabel::Id, + true, chip::NullOptional); } case 14: { - LogStep(14, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(14, "TH_CR1 opens a commissioning window on DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, + chip::Optional(10000), chip::NullOptional + + ); } case 15: { - LogStep(15, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + LogStep(15, "Waiting after opening commissioning window"); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); + chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; + value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; + return WaitForMs(kIdentityAlpha, value); } case 16: { - LogStep(16, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(16, "TH_CR1 opens another commissioning window on DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, + chip::Optional(10000), chip::NullOptional + + ); } case 17: { - LogStep(17, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(17, "TH_CR2 starts a commissioning process on DUT_CE"); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); return PairWithCode(kIdentityBeta, value); } case 18: { - LogStep(18, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + LogStep(18, "DUT_CE is commissioned by TH_CR2"); VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + return WaitForCommissionee(kIdentityBeta, value); } case 19: { - LogStep(19, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); + LogStep(19, "TH2 reads CurrentFabricIndex attribute and save it for future use."); + return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); } case 20: { - LogStep(20, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(20, "TH_CR1 tries to revoke the commissioning window on DUT_CE using RevokeCommissioning command"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C02.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); + chip::app::Clusters::AdministratorCommissioning::Commands::RevokeCommissioning::Type value; + return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::RevokeCommissioning::Id, value, + chip::Optional(10000), chip::NullOptional + + ); } case 21: { - LogStep(21, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + LogStep(21, "TH_CR3 starts a commissioning process with DUT_CE"); VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); + value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + return PairWithCode(kIdentityGamma, value); } case 22: { - LogStep(22, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 23: { - LogStep(23, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 24: { - LogStep(24, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); - } - case 25: { - LogStep(25, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(22, "Remove TH2 FabricIndex"); + VerifyOrDo(!ShouldSkip("OPCREDS.S.C0a.Rsp && CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() - : chip::Span("MT:-24J0AFN00I.0648G00", 22); - return PairWithCode(kIdentityBeta, value); + chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type value; + value.fabricIndex = TH2FabricIndex; + return SendCommand(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Commands::RemoveFabric::Id, value, chip::Optional(10000), + chip::NullOptional + + ); } - case 26: { - LogStep(26, "TH_CR2 attempts to do PASE to DUT_CE using the correct onboarding payload"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = - mCorrectPayload.HasValue() ? mCorrectPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityBeta, value); } - case 27: { - LogStep(27, "TH_CR3 starts a commissioning process with DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; - value.payload = - mCorrectPayload.HasValue() ? mCorrectPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityGamma, value); + return CHIP_NO_ERROR; + } +}; + +class Test_TC_CADMIN_1_9Suite : public TestCommand +{ +public: + Test_TC_CADMIN_1_9Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_CADMIN_1_9", 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_CADMIN_1_9Suite() {} + + 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_CADMIN_1_13Suite : public TestCommand +class Test_TC_CADMIN_1_10Suite : public TestCommand { public: - Test_TC_CADMIN_1_13Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_13", 34, credsIssuerConfig) + Test_TC_CADMIN_1_10Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_CADMIN_1_10", 28, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); @@ -102050,13 +98933,13 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); AddArgument("waitAfterCommissioning", 0, UINT16_MAX, &mWaitAfterCommissioning); AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); - AddArgument("payload", &mPayload); - AddArgument("PakeVerifier", &mPakeVerifier); + AddArgument("correctPayload", &mCorrectPayload); + AddArgument("incorrectSetupCodePayload", &mIncorrectSetupCodePayload); } - ~Test_TC_CADMIN_1_13Suite() {} + ~Test_TC_CADMIN_1_10Suite() {} - chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(600)); } + chip::System::Clock::Timeout GetWaitDuration() const override { return chip::System::Clock::Seconds16(mTimeout.ValueOr(700)); } private: chip::Optional mNodeId; @@ -102067,8 +98950,8 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand chip::Optional mEndpoint; chip::Optional mWaitAfterCommissioning; chip::Optional mDiscriminator; - chip::Optional mPayload; - chip::Optional mPakeVerifier; + chip::Optional mCorrectPayload; + chip::Optional mIncorrectSetupCodePayload; chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } @@ -102103,183 +98986,96 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand break; case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("windowStatus", value, 2U)); - } + shouldContinue = true; break; case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); shouldContinue = true; break; case 7: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); shouldContinue = true; break; case 8: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); shouldContinue = true; break; case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); shouldContinue = true; break; case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); shouldContinue = true; break; case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; break; case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); shouldContinue = true; break; case 13: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); shouldContinue = true; break; case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); shouldContinue = true; break; case 15: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; break; case 16: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); shouldContinue = true; break; case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.HasValue(), true)); - VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.Value(), 2)); + shouldContinue = true; break; case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValue("fabrics[0].nodeID", iter_0.GetValue().nodeID, - mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); - VerifyOrReturn(CheckValue("fabrics[1].nodeID", iter_0.GetValue().nodeID, - mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 2)); - VerifyOrReturn(CheckValue("fabrics[2].nodeID", iter_0.GetValue().nodeID, - mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[2].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 3)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; break; case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); shouldContinue = true; break; case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; break; case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); shouldContinue = true; break; case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("windowStatus", value, 1U)); - } + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; break; case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); shouldContinue = true; break; case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); - VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.HasValue(), true)); - VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.Value(), 2)); + shouldContinue = true; break; case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList< - chip::app::Clusters::OperationalCredentials::Structs::FabricDescriptorStruct::DecodableType> - value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 0)); - VerifyOrReturn(CheckValue("fabrics[0].nodeID", iter_0.GetValue().nodeID, - mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[0].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 1)); - VerifyOrReturn(CheckValue("fabrics[1].nodeID", iter_0.GetValue().nodeID, - mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[1].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckNextListItemDecodes("fabrics", iter_0, 2)); - VerifyOrReturn(CheckValue("fabrics[2].nodeID", iter_0.GetValue().nodeID, - mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL)); - VerifyOrReturn(CheckValueAsString("fabrics[2].label", iter_0.GetValue().label, chip::CharSpan("", 0))); - VerifyOrReturn(CheckNoMoreListItems("fabrics", iter_0, 3)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + shouldContinue = true; break; case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); shouldContinue = true; break; case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 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), EMBER_ZCL_STATUS_FAILURE)); - VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.HasValue(), true)); - VerifyOrReturn(CheckValue("clusterStatus", status.mClusterStatus.Value(), 2)); - break; - case 30: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); shouldContinue = true; break; - case 31: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("windowStatus", value, 0U)); - } - break; - case 32: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("adminFabricIndex", value)); - } - break; - case 33: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValueNull("adminVendorId", value)); - } - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -102326,7 +99122,7 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; + value.commissioningTimeout = 900U; return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, chip::Optional(10000), chip::NullOptional @@ -102341,317 +99137,331 @@ class Test_TC_CADMIN_1_13Suite : public TestCommand return WaitForMs(kIdentityAlpha, value); } case 5: { - LogStep(5, "TH_CR1 reads WindowStatus attribute from DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); - } - case 6: { - LogStep(6, - "TH_CR1 reads AdminFabricIndex attribute from DUT_CE and Verify TH_CR1 reads the AdminFabricIndex value " - "successfully and verify the value to be the same as the Fabric Index of the Fabrics attribute list entry in " - "TH_CR1"); - VerifyOrDo(!ShouldSkip("CADMIN.S.A0001 && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(5, "Verify that the DNS-SD advertisement shows CM=1"); + 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("Please enter 'y' for successgarbage: not in length on purpose", 28); + 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_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() + : chip::Span("MT:-24J0AFN00I.0648G00", 22); + value.discoverOnce.Emplace(); + value.discoverOnce.Value() = true; + return PairWithCode(kIdentityBeta, value); + } case 7: { - LogStep(7, - "TH_CR1 reads AdminVendorId attribute from DUT_CE and Verify TH_CR1 reads the AdminVendorId value successfully " - "and verify this value to be the same as the Vendor ID field of Fabrics attribute list entry in TH_CR1"); - VerifyOrDo(!ShouldSkip("CADMIN.S.A0002 && PICS_USER_PROMPT"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(7, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() + : chip::Span("MT:-24J0AFN00I.0648G00", 22); + value.discoverOnce.Emplace(); + value.discoverOnce.Value() = true; + return PairWithCode(kIdentityBeta, value); } case 8: { - LogStep(8, "Verify that the DNS-SD advertisement shows CM=1"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(8, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), 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); + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() + : chip::Span("MT:-24J0AFN00I.0648G00", 22); + value.discoverOnce.Emplace(); + value.discoverOnce.Value() = true; + return PairWithCode(kIdentityBeta, value); } case 9: { - LogStep(9, "TH_CR3 starts a commissioning process with DUT_CE"); + LogStep(9, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; - value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); - return PairWithCode(kIdentityGamma, value); + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() + : chip::Span("MT:-24J0AFN00I.0648G00", 22); + value.discoverOnce.Emplace(); + value.discoverOnce.Value() = true; + return PairWithCode(kIdentityBeta, value); } case 10: { - LogStep(10, "DUT_CE is commissioned to TH_CR3 on Fabric ID3 with Node ID3"); + LogStep(10, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; - return WaitForCommissionee(kIdentityGamma, value); + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() + : chip::Span("MT:-24J0AFN00I.0648G00", 22); + value.discoverOnce.Emplace(); + value.discoverOnce.Value() = true; + return PairWithCode(kIdentityBeta, value); } case 11: { - LogStep(11, "TH_CR1 opens a commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(11, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() + : chip::Span("MT:-24J0AFN00I.0648G00", 22); + value.discoverOnce.Emplace(); + value.discoverOnce.Value() = true; + return PairWithCode(kIdentityBeta, value); } case 12: { - LogStep(12, "Waiting after opening commissioning window"); + LogStep(12, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; - return WaitForMs(kIdentityAlpha, value); + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() + : chip::Span("MT:-24J0AFN00I.0648G00", 22); + value.discoverOnce.Emplace(); + value.discoverOnce.Value() = true; + return PairWithCode(kIdentityBeta, value); } case 13: { - LogStep(13, "TH_CR2 starts a commissioning process with DUT_CE"); + LogStep(13, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() + : chip::Span("MT:-24J0AFN00I.0648G00", 22); + value.discoverOnce.Emplace(); + value.discoverOnce.Value() = true; return PairWithCode(kIdentityBeta, value); } case 14: { - LogStep(14, "DUT_CE is commissioned to TH_CR2 on Fabric ID2 with Node ID2"); + LogStep(14, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; - return WaitForCommissionee(kIdentityBeta, value); + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() + : chip::Span("MT:-24J0AFN00I.0648G00", 22); + value.discoverOnce.Emplace(); + value.discoverOnce.Value() = true; + return PairWithCode(kIdentityBeta, value); } case 15: { - LogStep(15, "TH_CR1 opens a commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C01.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(15, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() + : chip::Span("MT:-24J0AFN00I.0648G00", 22); + value.discoverOnce.Emplace(); + value.discoverOnce.Value() = true; + return PairWithCode(kIdentityBeta, value); } case 16: { - LogStep(16, "Waiting after opening commissioning window"); + LogStep(16, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; - return WaitForMs(kIdentityAlpha, value); + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() + : chip::Span("MT:-24J0AFN00I.0648G00", 22); + value.discoverOnce.Emplace(); + value.discoverOnce.Value() = true; + return PairWithCode(kIdentityBeta, value); } case 17: { - LogStep(17, "TH_CR1 opens a 2nd commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(17, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - value.PAKEPasscodeVerifier = mPakeVerifier.HasValue() - ? mPakeVerifier.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\xb9\x61\x70\xaa\xe8\x03\x34\x68\x84\x72\x4f\xe9\xa3\xb2\x87\xc3\x03\x30\xc2\xa6\x60\x37\x5d\x17\xbb\x20" - "\x5a\x8c\xf1\xae\xcb\x35\x04\x57\xf8\xab\x79\xee\x25\x3a\xb6\xa8\xe4\x6b\xb0\x9e\x54\x3a\xe4\x22\x73\x6d" - "\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51" - "\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf"), - 97); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() + : chip::Span("MT:-24J0AFN00I.0648G00", 22); + value.discoverOnce.Emplace(); + value.discoverOnce.Value() = true; + return PairWithCode(kIdentityBeta, value); } case 18: { - LogStep(18, "TH_CR1 reads the list of Fabrics on DUT_CE"); - VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); + LogStep(18, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() + : chip::Span("MT:-24J0AFN00I.0648G00", 22); + value.discoverOnce.Emplace(); + value.discoverOnce.Value() = true; + return PairWithCode(kIdentityBeta, value); } case 19: { - LogStep(19, "Wait for the expiration of PIXIT.CADMIN.CwDuration seconds"); + LogStep(19, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 180000UL; - return WaitForMs(kIdentityAlpha, value); + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() + : chip::Span("MT:-24J0AFN00I.0648G00", 22); + value.discoverOnce.Emplace(); + value.discoverOnce.Value() = true; + return PairWithCode(kIdentityBeta, value); } case 20: { - LogStep(20, "TH_CR1 re-opens new commissioning window on DUT_CE using ECM"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(20, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - value.PAKEPasscodeVerifier = mPakeVerifier.HasValue() - ? mPakeVerifier.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\xb9\x61\x70\xaa\xe8\x03\x34\x68\x84\x72\x4f\xe9\xa3\xb2\x87\xc3\x03\x30\xc2\xa6\x60\x37\x5d\x17\xbb\x20" - "\x5a\x8c\xf1\xae\xcb\x35\x04\x57\xf8\xab\x79\xee\x25\x3a\xb6\xa8\xe4\x6b\xb0\x9e\x54\x3a\xe4\x22\x73\x6d" - "\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51" - "\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf"), - 97); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() + : chip::Span("MT:-24J0AFN00I.0648G00", 22); + value.discoverOnce.Emplace(); + value.discoverOnce.Value() = true; + return PairWithCode(kIdentityBeta, value); } case 21: { - LogStep(21, "Waiting after opening commissioning window"); + LogStep(21, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; - return WaitForMs(kIdentityAlpha, value); + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() + : chip::Span("MT:-24J0AFN00I.0648G00", 22); + value.discoverOnce.Emplace(); + value.discoverOnce.Value() = true; + return PairWithCode(kIdentityBeta, value); } case 22: { - LogStep(22, "TH_CR1 reads WindowStatus attribute from DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); + LogStep(22, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() + : chip::Span("MT:-24J0AFN00I.0648G00", 22); + value.discoverOnce.Emplace(); + value.discoverOnce.Value() = true; + return PairWithCode(kIdentityBeta, value); } case 23: { - LogStep(23, "Verify that the DNS-SD advertisement shows CM=2"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(23, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), 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); + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() + : chip::Span("MT:-24J0AFN00I.0648G00", 22); + value.discoverOnce.Emplace(); + value.discoverOnce.Value() = true; + return PairWithCode(kIdentityBeta, value); } case 24: { - LogStep(24, "TH_CR3 opens a 2nd commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(24, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - value.PAKEPasscodeVerifier = mPakeVerifier.HasValue() - ? mPakeVerifier.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\xb9\x61\x70\xaa\xe8\x03\x34\x68\x84\x72\x4f\xe9\xa3\xb2\x87\xc3\x03\x30\xc2\xa6\x60\x37\x5d\x17\xbb\x20" - "\x5a\x8c\xf1\xae\xcb\x35\x04\x57\xf8\xab\x79\xee\x25\x3a\xb6\xa8\xe4\x6b\xb0\x9e\x54\x3a\xe4\x22\x73\x6d" - "\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51" - "\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf"), - 97); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); - return SendCommand(kIdentityGamma, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() + : chip::Span("MT:-24J0AFN00I.0648G00", 22); + value.discoverOnce.Emplace(); + value.discoverOnce.Value() = true; + return PairWithCode(kIdentityBeta, value); } case 25: { - LogStep(25, "TH_CR1 reads the list of Fabrics on DUT_CE"); - VerifyOrDo(!ShouldSkip("OPCREDS.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, - OperationalCredentials::Attributes::Fabrics::Id, false, chip::NullOptional); + LogStep(25, "TH_CR2 starts a commissioning process with DUT_CE using Invalid setup code"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mIncorrectSetupCodePayload.HasValue() ? mIncorrectSetupCodePayload.Value() + : chip::Span("MT:-24J0AFN00I.0648G00", 22); + value.discoverOnce.Emplace(); + value.discoverOnce.Value() = true; + return PairWithCode(kIdentityBeta, value); } case 26: { - LogStep(26, "Wait for the expiration of PIXIT_COMM_WIN seconds"); + LogStep(26, "TH_CR2 attempts to do PASE to DUT_CE using the correct onboarding payload"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 180000UL; - return WaitForMs(kIdentityAlpha, value); + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = + mCorrectPayload.HasValue() ? mCorrectPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + return PairWithCode(kIdentityBeta, value); } case 27: { - LogStep(27, "TH_CR1 opens a new commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(27, "TH_CR3 starts a commissioning process with DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - value.PAKEPasscodeVerifier = mPakeVerifier.HasValue() - ? mPakeVerifier.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\xb9\x61\x70\xaa\xe8\x03\x34\x68\x84\x72\x4f\xe9\xa3\xb2\x87\xc3\x03\x30\xc2\xa6\x60\x37\x5d\x17\xbb\x20" - "\x5a\x8c\xf1\xae\xcb\x35\x04\x57\xf8\xab\x79\xee\x25\x3a\xb6\xa8\xe4\x6b\xb0\x9e\x54\x3a\xe4\x22\x73\x6d" - "\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51" - "\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf"), - 97); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); - return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional - - ); + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId3.HasValue() ? mNodeId3.Value() : 12586990ULL; + value.payload = + mCorrectPayload.HasValue() ? mCorrectPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + return PairWithCode(kIdentityGamma, value); } - case 28: { - LogStep(28, "Waiting after opening commissioning window"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; - return WaitForMs(kIdentityAlpha, value); } - case 29: { - LogStep(29, "TH_CR2 opens a 2nd commissioning window on DUT_CE using ECM"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; - value.commissioningTimeout = 180U; - value.PAKEPasscodeVerifier = mPakeVerifier.HasValue() - ? mPakeVerifier.Value() - : chip::ByteSpan( - chip::Uint8::from_const_char( - "\xb9\x61\x70\xaa\xe8\x03\x34\x68\x84\x72\x4f\xe9\xa3\xb2\x87\xc3\x03\x30\xc2\xa6\x60\x37\x5d\x17\xbb\x20" - "\x5a\x8c\xf1\xae\xcb\x35\x04\x57\xf8\xab\x79\xee\x25\x3a\xb6\xa8\xe4\x6b\xb0\x9e\x54\x3a\xe4\x22\x73\x6d" - "\xe5\x01\xe3\xdb\x37\xd4\x41\xfe\x34\x49\x20\xd0\x95\x48\xe4\xc1\x82\x40\x63\x0c\x4f\xf4\x91\x3c\x53\x51" - "\x38\x39\xb7\xc0\x7f\xcc\x06\x27\xa1\xb8\x57\x3a\x14\x9f\xcd\x1f\xa4\x66\xcf"), - 97); - value.discriminator = mDiscriminator.HasValue() ? mDiscriminator.Value() : 3840U; - value.iterations = 1000UL; - value.salt = chip::ByteSpan(chip::Uint8::from_const_char("SPAKE2P Key Saltgarbage: not in length on purpose"), 16); - return SendCommand(kIdentityBeta, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Commands::OpenCommissioningWindow::Id, value, - chip::Optional(10000), chip::NullOptional + return CHIP_NO_ERROR; + } +}; - ); - } - case 30: { - LogStep(30, "Wait for the expiration of PIXIT.CADMIN.CwDuration seconds"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; - value.ms = 180000UL; - return WaitForMs(kIdentityAlpha, value); - } - case 31: { - LogStep(31, "TH_CR1 reads WindowStatus attribute from DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); - } - case 32: { - LogStep(32, "TH_CR1 reads AdminFabricIndex attribute from DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Attributes::AdminFabricIndex::Id, true, chip::NullOptional); - } - case 33: { - LogStep(33, "TH_CR1 reads AdminVendorId attribute from DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, - AdministratorCommissioning::Attributes::AdminVendorId::Id, true, chip::NullOptional); +class Test_TC_CADMIN_1_13Suite : public TestCommand +{ +public: + Test_TC_CADMIN_1_13Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_CADMIN_1_13", 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_CADMIN_1_13Suite() {} + + 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; } }; @@ -102821,7 +99631,7 @@ class Test_TC_CADMIN_1_24Suite : public TestCommand { public: Test_TC_CADMIN_1_24Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_CADMIN_1_24", 8, credsIssuerConfig) + TestCommand("Test_TC_CADMIN_1_24", 10, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); @@ -102867,12 +99677,16 @@ class Test_TC_CADMIN_1_24Suite : public TestCommand break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum value; @@ -102880,10 +99694,14 @@ class Test_TC_CADMIN_1_24Suite : public TestCommand VerifyOrReturn(CheckValue("windowStatus", value, 0U)); } break; - case 6: + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_INVALID_COMMAND)); break; - case 7: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::AdministratorCommissioning::CommissioningWindowStatusEnum value; @@ -102933,8 +99751,18 @@ class Test_TC_CADMIN_1_24Suite : public TestCommand return WaitForCommissionee(kIdentityAlpha, value); } case 3: { - LogStep(3, "TH_CR1 opens a commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + LogStep(3, "TH_CR1 opens a commissioning window on DUT_CE using ECM with a value of 180 seconds"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp"), 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_CR1 opens a commissioning window on DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; @@ -102956,22 +99784,32 @@ class Test_TC_CADMIN_1_24Suite : public TestCommand ); } - case 4: { - LogStep(4, "Wait for commissioning Window to 181 seconds"); + case 5: { + LogStep(5, "Wait for commissioning Window to 181 seconds"); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 181000UL; return WaitForMs(kIdentityAlpha, value); } - case 5: { - LogStep(5, "TH_CR1 reads the window status to verify the DUT_CE window is closed"); + case 6: { + LogStep(6, "TH_CR1 reads the window status to verify the DUT_CE window is closed"); VerifyOrDo(!ShouldSkip("CADMIN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); } - case 6: { - LogStep(6, "TH_CR1 opens a commissioning window on DUT_CE"); - VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 7: { + LogStep(7, "TH_CR1 opens a commissioning window on DUT_CE using ECM with a value of 179 seconds"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp"), 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_CR1 opens a commissioning window on DUT_CE"); + VerifyOrDo(!ShouldSkip("CADMIN.S.C00.Rsp && PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 179U; @@ -102993,8 +99831,8 @@ class Test_TC_CADMIN_1_24Suite : public TestCommand ); } - case 7: { - LogStep(7, "TH_CR1 reads the window status to verify the DUT_CE window is closed"); + case 9: { + LogStep(9, "TH_CR1 reads the window status to verify the DUT_CE window is closed"); VerifyOrDo(!ShouldSkip("CADMIN.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, AdministratorCommissioning::Attributes::WindowStatus::Id, true, chip::NullOptional); @@ -103279,65 +100117,175 @@ class Test_TC_MOD_3_1Suite : public TestCommand } }; -class Test_TC_MOD_3_2Suite : public TestCommand -{ -public: - Test_TC_MOD_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_3_2", 0, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_MOD_3_2Suite() {} - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MOD_3_3Suite : public TestCommand +class Test_TC_MOD_3_2Suite : public TestCommand +{ +public: + Test_TC_MOD_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_3_2", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_MOD_3_2Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + {} + return CHIP_NO_ERROR; + } +}; + +class Test_TC_MOD_3_3Suite : public TestCommand +{ +public: + Test_TC_MOD_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_3_3", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_MOD_3_3Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + {} + return CHIP_NO_ERROR; + } +}; + +class Test_TC_MOD_3_4Suite : public TestCommand +{ +public: + Test_TC_MOD_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_3_4", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_MOD_3_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_SU_1_1Suite : public TestCommand { public: - Test_TC_MOD_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_3_3", 0, credsIssuerConfig) + Test_TC_SU_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_1_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -103345,7 +100293,7 @@ class Test_TC_MOD_3_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MOD_3_3Suite() {} + ~Test_TC_SU_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -103389,10 +100337,10 @@ class Test_TC_MOD_3_3Suite : public TestCommand } }; -class Test_TC_MOD_3_4Suite : public TestCommand +class Test_TC_SU_2_1Suite : public TestCommand { public: - Test_TC_MOD_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_MOD_3_4", 0, credsIssuerConfig) + Test_TC_SU_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -103400,7 +100348,7 @@ class Test_TC_MOD_3_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_MOD_3_4Suite() {} + ~Test_TC_SU_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -103444,10 +100392,10 @@ class Test_TC_MOD_3_4Suite : public TestCommand } }; -class Test_TC_SU_1_1Suite : public TestCommand +class Test_TC_SU_2_2Suite : public TestCommand { public: - Test_TC_SU_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_1_1", 0, credsIssuerConfig) + Test_TC_SU_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -103455,7 +100403,7 @@ class Test_TC_SU_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_1_1Suite() {} + ~Test_TC_SU_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -103499,10 +100447,10 @@ class Test_TC_SU_1_1Suite : public TestCommand } }; -class Test_TC_SU_2_1Suite : public TestCommand +class Test_TC_SU_2_3Suite : public TestCommand { public: - Test_TC_SU_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_1", 0, credsIssuerConfig) + Test_TC_SU_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -103510,7 +100458,7 @@ class Test_TC_SU_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_2_1Suite() {} + ~Test_TC_SU_2_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -103554,10 +100502,10 @@ class Test_TC_SU_2_1Suite : public TestCommand } }; -class Test_TC_SU_2_2Suite : public TestCommand +class Test_TC_SU_2_4Suite : public TestCommand { public: - Test_TC_SU_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_2", 0, credsIssuerConfig) + Test_TC_SU_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -103565,7 +100513,7 @@ class Test_TC_SU_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_2_2Suite() {} + ~Test_TC_SU_2_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -103609,10 +100557,10 @@ class Test_TC_SU_2_2Suite : public TestCommand } }; -class Test_TC_SU_2_3Suite : public TestCommand +class Test_TC_SU_2_5Suite : public TestCommand { public: - Test_TC_SU_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_3", 0, credsIssuerConfig) + Test_TC_SU_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_5", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -103620,7 +100568,7 @@ class Test_TC_SU_2_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_2_3Suite() {} + ~Test_TC_SU_2_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -103664,10 +100612,10 @@ class Test_TC_SU_2_3Suite : public TestCommand } }; -class Test_TC_SU_2_4Suite : public TestCommand +class Test_TC_SU_2_6Suite : public TestCommand { public: - Test_TC_SU_2_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_4", 0, credsIssuerConfig) + Test_TC_SU_2_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_6", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -103675,7 +100623,7 @@ class Test_TC_SU_2_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_2_4Suite() {} + ~Test_TC_SU_2_6Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -103719,10 +100667,10 @@ class Test_TC_SU_2_4Suite : public TestCommand } }; -class Test_TC_SU_2_5Suite : public TestCommand +class Test_TC_SU_2_7Suite : public TestCommand { public: - Test_TC_SU_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_5", 0, credsIssuerConfig) + Test_TC_SU_2_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_7", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -103730,7 +100678,7 @@ class Test_TC_SU_2_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_2_5Suite() {} + ~Test_TC_SU_2_7Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -103774,10 +100722,10 @@ class Test_TC_SU_2_5Suite : public TestCommand } }; -class Test_TC_SU_2_6Suite : public TestCommand +class Test_TC_SU_2_8Suite : public TestCommand { public: - Test_TC_SU_2_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_6", 0, credsIssuerConfig) + Test_TC_SU_2_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_8", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -103785,7 +100733,7 @@ class Test_TC_SU_2_6Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_2_6Suite() {} + ~Test_TC_SU_2_8Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -103829,10 +100777,10 @@ class Test_TC_SU_2_6Suite : public TestCommand } }; -class Test_TC_SU_2_7Suite : public TestCommand +class Test_TC_SU_3_1Suite : public TestCommand { public: - Test_TC_SU_2_7Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_7", 0, credsIssuerConfig) + Test_TC_SU_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -103840,7 +100788,7 @@ class Test_TC_SU_2_7Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_2_7Suite() {} + ~Test_TC_SU_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -103884,10 +100832,10 @@ class Test_TC_SU_2_7Suite : public TestCommand } }; -class Test_TC_SU_2_8Suite : public TestCommand +class Test_TC_SU_3_2Suite : public TestCommand { public: - Test_TC_SU_2_8Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_2_8", 0, credsIssuerConfig) + Test_TC_SU_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -103895,7 +100843,7 @@ class Test_TC_SU_2_8Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_2_8Suite() {} + ~Test_TC_SU_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -103939,10 +100887,10 @@ class Test_TC_SU_2_8Suite : public TestCommand } }; -class Test_TC_SU_3_1Suite : public TestCommand +class Test_TC_SU_3_3Suite : public TestCommand { public: - Test_TC_SU_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_3_1", 0, credsIssuerConfig) + Test_TC_SU_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_3_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -103950,7 +100898,7 @@ class Test_TC_SU_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_3_1Suite() {} + ~Test_TC_SU_3_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -103994,10 +100942,10 @@ class Test_TC_SU_3_1Suite : public TestCommand } }; -class Test_TC_SU_3_2Suite : public TestCommand +class Test_TC_SU_3_4Suite : public TestCommand { public: - Test_TC_SU_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_3_2", 0, credsIssuerConfig) + Test_TC_SU_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_3_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -104005,7 +100953,7 @@ class Test_TC_SU_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_3_2Suite() {} + ~Test_TC_SU_3_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -104049,10 +100997,10 @@ class Test_TC_SU_3_2Suite : public TestCommand } }; -class Test_TC_SU_3_3Suite : public TestCommand +class Test_TC_SU_4_1Suite : public TestCommand { public: - Test_TC_SU_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_3_3", 0, credsIssuerConfig) + Test_TC_SU_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_4_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -104060,7 +101008,7 @@ class Test_TC_SU_3_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_3_3Suite() {} + ~Test_TC_SU_4_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -104104,10 +101052,10 @@ class Test_TC_SU_3_3Suite : public TestCommand } }; -class Test_TC_SU_3_4Suite : public TestCommand +class Test_TC_SU_4_2Suite : public TestCommand { public: - Test_TC_SU_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_3_4", 0, credsIssuerConfig) + Test_TC_SU_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_4_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -104115,7 +101063,7 @@ class Test_TC_SU_3_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_3_4Suite() {} + ~Test_TC_SU_4_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -104159,10 +101107,10 @@ class Test_TC_SU_3_4Suite : public TestCommand } }; -class Test_TC_SU_4_1Suite : public TestCommand +class Test_TC_PSCFG_2_2Suite : public TestCommand { public: - Test_TC_SU_4_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_4_1", 0, credsIssuerConfig) + Test_TC_PSCFG_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PSCFG_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -104170,7 +101118,7 @@ class Test_TC_SU_4_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_4_1Suite() {} + ~Test_TC_PSCFG_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -104214,10 +101162,10 @@ class Test_TC_SU_4_1Suite : public TestCommand } }; -class Test_TC_SU_4_2Suite : public TestCommand +class Test_TC_PSCFG_3_1Suite : public TestCommand { public: - Test_TC_SU_4_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SU_4_2", 0, credsIssuerConfig) + Test_TC_PSCFG_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PSCFG_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -104225,7 +101173,7 @@ class Test_TC_SU_4_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_SU_4_2Suite() {} + ~Test_TC_PSCFG_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -104269,10 +101217,10 @@ class Test_TC_SU_4_2Suite : public TestCommand } }; -class Test_TC_PSCFG_2_2Suite : public TestCommand +class Test_TC_PRS_3_1Suite : public TestCommand { public: - Test_TC_PSCFG_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PSCFG_2_2", 0, credsIssuerConfig) + Test_TC_PRS_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PRS_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -104280,7 +101228,7 @@ class Test_TC_PSCFG_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_PSCFG_2_2Suite() {} + ~Test_TC_PRS_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -106201,6 +103149,61 @@ class Test_TC_FLW_2_2Suite : public TestCommand } }; +class Test_TC_FLW_3_1Suite : public TestCommand +{ +public: + Test_TC_FLW_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_FLW_3_1", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_FLW_3_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + {} + return CHIP_NO_ERROR; + } +}; + class Test_TC_OCC_3_1Suite : public TestCommand { public: @@ -106367,6 +103370,61 @@ class Test_TC_PS_2_2Suite : public TestCommand } }; +class Test_TC_PS_3_1Suite : public TestCommand +{ +public: + Test_TC_PS_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PS_3_1", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_PS_3_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + {} + return CHIP_NO_ERROR; + } +}; + class Test_TC_BOOL_2_2Suite : public TestCommand { public: @@ -106422,6 +103480,61 @@ class Test_TC_BOOL_2_2Suite : public TestCommand } }; +class Test_TC_BOOL_3_1Suite : public TestCommand +{ +public: + Test_TC_BOOL_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BOOL_3_1", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_BOOL_3_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + {} + return CHIP_NO_ERROR; + } +}; + class Test_TC_CC_2_2Suite : public TestCommand { public: @@ -113342,6 +110455,61 @@ class Test_TC_SWTCH_2_2Suite : public TestCommand } }; +class Test_TC_SWTCH_3_1Suite : public TestCommand +{ +public: + Test_TC_SWTCH_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_SWTCH_3_1", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_SWTCH_3_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + {} + return CHIP_NO_ERROR; + } +}; + class Test_TC_SWTCH_3_2Suite : public TestCommand { public: @@ -114212,6 +111380,61 @@ class Test_TC_ACT_2_2Suite : public TestCommand } }; +class Test_TC_ACT_3_1Suite : public TestCommand +{ +public: + Test_TC_ACT_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_3_1", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_ACT_3_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + {} + return CHIP_NO_ERROR; + } +}; + class Test_TC_ACT_3_2Suite : public TestCommand { public: @@ -114982,6 +112205,118 @@ class Test_TC_ACL_2_6Suite : public TestCommand } }; +class Test_TC_BRBINFO_1_1Suite : public TestCommand +{ +public: + Test_TC_BRBINFO_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_BRBINFO_1_1", 0, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_BRBINFO_1_1Suite() {} + + chip::System::Clock::Timeout GetWaitDuration() const override + { + return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); + } + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + switch (testIndex) + {} + return CHIP_NO_ERROR; + } +}; + +class Test_TC_BRBINFO_2_1Suite : public TestCommand +{ +public: + Test_TC_BRBINFO_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_BRBINFO_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_BRBINFO_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_BRBINFO_2_2Suite : public TestCommand { public: @@ -115173,8 +112508,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), @@ -115243,7 +112576,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), @@ -115256,7 +112588,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), @@ -115492,6 +112823,7 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -115535,6 +112867,8 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -115583,6 +112917,8 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -115616,9 +112952,12 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -115646,6 +112985,7 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -115660,6 +113000,7 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), @@ -115674,6 +113015,8 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), + make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), 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 36318231e2cb0d..29947c74f391e6 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -45,7 +45,6 @@ class TestList : public Command { printf("Test_TC_ACE_1_5\n"); printf("Test_TC_BOOL_1_1\n"); printf("Test_TC_BOOL_2_1\n"); - printf("Test_TC_BRBINFO_1_1\n"); printf("Test_TC_ACT_1_1\n"); printf("Test_TC_BIND_1_1\n"); printf("Test_TC_CC_1_1\n"); @@ -108,7 +107,6 @@ class TestList : public Command { printf("Test_TC_APBSC_1_10\n"); printf("Test_TC_CONTENTLAUNCHER_1_11\n"); printf("Test_TC_ALOGIN_1_12\n"); - printf("Test_TC_ALOGIN_12_1\n"); printf("Test_TC_LOWPOWER_2_1\n"); printf("Test_TC_KEYPADINPUT_3_2\n"); printf("Test_TC_KEYPADINPUT_3_3\n"); @@ -118,7 +116,6 @@ class TestList : public Command { printf("Test_TC_MEDIAINPUT_3_11\n"); printf("Test_TC_MEDIAINPUT_3_12\n"); printf("Test_TC_MEDIAINPUT_3_13\n"); - printf("Test_TC_WAKEONLAN_4_1\n"); printf("Test_TC_CHANNEL_5_1\n"); printf("Test_TC_CHANNEL_5_2\n"); printf("Test_TC_CHANNEL_5_3\n"); @@ -6496,735 +6493,6 @@ class Test_TC_BOOL_2_1 : public TestCommandBridge { } }; -class Test_TC_BRBINFO_1_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_BRBINFO_1_1() - : TestCommandBridge("Test_TC_BRBINFO_1_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_BRBINFO_1_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_BRBINFO_1_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_BRBINFO_1_1\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the ClusterRevision from DUT\n"); - err = TestThReadsTheClusterRevisionFromDut_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH reads the FeatureMap from DUT\n"); - err = TestThReadsTheFeatureMapFromDut_2(); - break; - case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads AttributeList from DUT\n"); - err = TestThReadsAttributeListFromDut_3(); - break; - case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads optional attribute(VendorName) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A0001")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeVendorNameInAttributeList_4(); - break; - case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads optional attribute(VendorID) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A0002")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeVendorIDInAttributeList_5(); - break; - case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads optional attribute(ProductName) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A0003")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeProductNameInAttributeList_6(); - break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads optional attribute(NodeLabel) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A0005")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeNodeLabelInAttributeList_7(); - break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads optional attribute(HardwareVersion) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A0007")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeHardwareVersionInAttributeList_8(); - break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads optional attribute(HardwareVersionString) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A0008")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeHardwareVersionStringInAttributeList_9(); - break; - case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH reads optional attribute(SoftwareVersion) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A0009")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeSoftwareVersionInAttributeList_10(); - break; - case 11: - ChipLogProgress( - chipTool, " ***** Test Step 11 : TH reads optional attribute(SoftwareVersionString) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A000a")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeSoftwareVersionStringInAttributeList_11(); - break; - case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads optional attribute(ManufacturingDate) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A000b")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeManufacturingDateInAttributeList_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads optional attribute(PartNumber) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A000c")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributePartNumberInAttributeList_13(); - break; - case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads optional attribute(ProductURL) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A000d")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeProductURLInAttributeList_14(); - break; - case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads optional attribute(ProductLabel) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A000e")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeProductLabelInAttributeList_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads optional attribute(SerialNumber) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A000f")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeSerialNumberInAttributeList_16(); - break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads optional attribute(UniqueID) in AttributeList\n"); - if (ShouldSkip("BRBINFO.S.A0012")) { - NextTest(); - return; - } - err = TestThReadsOptionalAttributeUniqueIDInAttributeList_17(); - break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : TH1 reads AcceptedCommandList from DUT\n"); - err = TestTh1ReadsAcceptedCommandListFromDut_18(); - break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : TH1 reads GeneratedCommandList from DUT\n"); - err = TestTh1ReadsGeneratedCommandListFromDut_19(); - 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; - } - - // 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 = 20; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestThReadsTheClusterRevisionFromDut_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(3) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the ClusterRevision from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); - } - - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsTheFeatureMapFromDut_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(3) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the FeatureMap from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsAttributeListFromDut_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(3) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads AttributeList from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 17UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsOptionalAttributeVendorNameInAttributeList_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(3) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(VendorName) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsOptionalAttributeVendorIDInAttributeList_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(3) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(VendorID) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsOptionalAttributeProductNameInAttributeList_6() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(3) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(ProductName) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsOptionalAttributeNodeLabelInAttributeList_7() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(3) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(NodeLabel) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 5UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsOptionalAttributeHardwareVersionInAttributeList_8() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(3) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(HardwareVersion) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 7UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsOptionalAttributeHardwareVersionStringInAttributeList_9() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(3) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(HardwareVersionString) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 8UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsOptionalAttributeSoftwareVersionInAttributeList_10() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(3) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(SoftwareVersion) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 9UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsOptionalAttributeSoftwareVersionStringInAttributeList_11() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(3) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(SoftwareVersionString) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 10UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsOptionalAttributeManufacturingDateInAttributeList_12() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(3) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(ManufacturingDate) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 11UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsOptionalAttributePartNumberInAttributeList_13() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(3) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(PartNumber) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 12UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsOptionalAttributeProductURLInAttributeList_14() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(3) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(ProductURL) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 13UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsOptionalAttributeProductLabelInAttributeList_15() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(3) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(ProductLabel) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 14UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsOptionalAttributeSerialNumberInAttributeList_16() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(3) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(SerialNumber) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 15UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThReadsOptionalAttributeUniqueIDInAttributeList_17() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(3) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads optional attribute(UniqueID) in AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 18UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestTh1ReadsAcceptedCommandListFromDut_18() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(3) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH1 reads AcceptedCommandList from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("AcceptedCommandList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestTh1ReadsGeneratedCommandListFromDut_19() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(3) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH1 reads GeneratedCommandList from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("GeneratedCommandList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - class Test_TC_ACT_1_1 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced @@ -9395,7 +8663,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads CompensationText attribute from DUT\n"); - if (ShouldSkip("CC.S.A0005")) { + if (ShouldSkip("CC.S.A0006")) { NextTest(); return; } @@ -16560,6 +15828,22 @@ class Test_TC_CC_5_1 : public TestCommandBridge { } err = TestThReadsEnhancedColorModeAttributeFromDut_58(); break; + case 59: + ChipLogProgress(chipTool, " ***** Test Step 59 : Turn off light that we turned on\n"); + if (ShouldSkip("OO.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestTurnOffLightThatWeTurnedOn_59(); + break; + case 60: + ChipLogProgress(chipTool, " ***** Test Step 60 : Check on/off attribute value is false after off command\n"); + if (ShouldSkip("OO.S.A0000")) { + NextTest(); + return; + } + err = TestCheckOnOffAttributeValueIsFalseAfterOffCommand_60(); + break; } if (CHIP_NO_ERROR != err) { @@ -16748,6 +16032,12 @@ class Test_TC_CC_5_1 : public TestCommandBridge { case 58: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 59: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 60: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -16761,7 +16051,7 @@ class Test_TC_CC_5_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 59; + const uint16_t mTestCount = 61; chip::Optional mNodeId; chip::Optional mCluster; @@ -17908,6 +17198,47 @@ class Test_TC_CC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } + + CHIP_ERROR TestTurnOffLightThatWeTurnedOn_59() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster offWithCompletion:^(NSError * _Nullable err) { + NSLog(@"Turn off light that we turned on Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCheckOnOffAttributeValueIsFalseAfterOffCommand_60() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeOnOffWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Check on/off attribute value is false after off command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = value; + VerifyOrReturn(CheckValue("OnOff", actualValue, 0)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } }; class Test_TC_CC_5_2 : public TestCommandBridge { @@ -32482,321 +31813,329 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { err = TestThWrites0ToTheOptionsAttribute_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends Off command to DUT\n"); - if (ShouldSkip("LVL.S.C04.Rsp && OO.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH writes NULL to the OnLevel attribute\n"); + if (ShouldSkip("LVL.S.A0011")) { NextTest(); return; } - err = TestThSendsOffCommandToDut_5(); + err = TestThWritesNullToTheOnLevelAttribute_5(); break; case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends Off command to DUT\n"); + if (ShouldSkip("LVL.S.C04.Rsp && OO.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestThSendsOffCommandToDut_6(); + break; + case 7: ChipLogProgress(chipTool, - " ***** Test Step 6 : TH sends a MoveToLevelWithOnOff command to DUT, with Level =50 and TransitionTime =0 " + " ***** Test Step 7 : TH sends a MoveToLevelWithOnOff command to DUT, with Level =50 and TransitionTime =0 " "(immediate)\n"); if (ShouldSkip("LVL.S.C04.Rsp")) { NextTest(); return; } - err = TestThSendsAMoveToLevelWithOnOffCommandToDutWithLevel50AndTransitionTime0Immediate_6(); + err = TestThSendsAMoveToLevelWithOnOffCommandToDutWithLevel50AndTransitionTime0Immediate_7(); break; - case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads OnOff attribute (On/Off cluster) from DUT\n"); + case 8: + ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads OnOff attribute (On/Off cluster) from DUT\n"); if (ShouldSkip("OO.S.A0000 && LVL.S.C04.Rsp")) { NextTest(); return; } - err = TestThReadsOnOffAttributeOnOffClusterFromDut_7(); + err = TestThReadsOnOffAttributeOnOffClusterFromDut_8(); break; - case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH reads CurrentLevel attribute from DUT\n"); + case 9: + ChipLogProgress(chipTool, " ***** Test Step 9 : TH reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C04.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_8(); + err = TestThReadsCurrentLevelAttributeFromDut_9(); break; - case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH sends On command to DUT\n"); + case 10: + ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends On command to DUT\n"); if (ShouldSkip("LVL.S.C04.Rsp && OO.S.C01.Rsp")) { NextTest(); return; } - err = TestThSendsOnCommandToDut_9(); + err = TestThSendsOnCommandToDut_10(); break; - case 10: + case 11: ChipLogProgress(chipTool, - " ***** Test Step 10 : TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate)\n"); + " ***** Test Step 11 : TH sends a MoveToLevel command to DUT, with Level =50 and TransitionTime =0 (immediate)\n"); if (ShouldSkip("LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_10(); + err = TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_11(); break; - case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads CurrentLevel attribute from DUT\n"); + case 12: + ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_11(); + err = TestThReadsCurrentLevelAttributeFromDut_12(); break; - case 12: + case 13: ChipLogProgress(chipTool, - " ***** Test Step 12 : TH sends a MoveToLevel command to the DUT with Level = 200 and TransitionTime = 300 (30 s). " + " ***** Test Step 13 : TH sends a MoveToLevel command to the DUT with Level = 200 and TransitionTime = 300 (30 s). " "This means the level should increase by 150 units in 30s, so 5 units/s\n"); if (ShouldSkip("LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestThSendsAMoveToLevelCommandToTheDutWithLevel200AndTransitionTime30030SThisMeansTheLevelShouldIncreaseBy150UnitsIn30sSo5UnitsS_12(); - break; - case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 10000ms\n"); - err = TestWait10000ms_13(); + err = TestThSendsAMoveToLevelCommandToTheDutWithLevel200AndTransitionTime30030SThisMeansTheLevelShouldIncreaseBy150UnitsIn30sSo5UnitsS_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { - NextTest(); - return; - } - err = TestThReadsCurrentLevelAttributeFromDut_14(); + ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 10000ms\n"); + err = TestWait10000ms_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : Wait 10000ms\n"); - err = TestWait10000ms_15(); - break; - case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads CurrentLevel attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 15 : TH reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_16(); + err = TestThReadsCurrentLevelAttributeFromDut_15(); break; - case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 10000ms\n"); - err = TestWait10000ms_17(); + case 16: + ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 10000ms\n"); + err = TestWait10000ms_16(); break; - case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : TH reads CurrentLevel attribute from DUT\n"); + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : TH reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_18(); + err = TestThReadsCurrentLevelAttributeFromDut_17(); break; - case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : Wait 5000ms\n"); - err = TestWait5000ms_19(); + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Wait 10000ms\n"); + err = TestWait10000ms_18(); break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : TH reads CurrentLevel attribute from DUT\n"); + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : TH reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_20(); + err = TestThReadsCurrentLevelAttributeFromDut_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : Wait 5000ms\n"); + err = TestWait5000ms_20(); break; case 21: ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && !LVL.S.M.VarRate")) { + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && LVL.S.M.VarRate")) { NextTest(); return; } err = TestThReadsCurrentLevelAttributeFromDut_21(); break; case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : TH writes 0 to the Options attribute\n"); - if (ShouldSkip("LVL.S.A000f")) { + ChipLogProgress(chipTool, " ***** Test Step 22 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000 && !LVL.S.M.VarRate")) { NextTest(); return; } - err = TestThWrites0ToTheOptionsAttribute_22(); + err = TestThReadsCurrentLevelAttributeFromDut_22(); break; case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : TH reads Options attribute\n"); + ChipLogProgress(chipTool, " ***** Test Step 23 : TH writes 0 to the Options attribute\n"); if (ShouldSkip("LVL.S.A000f")) { NextTest(); return; } - err = TestThReadsOptionsAttribute_23(); + err = TestThWrites0ToTheOptionsAttribute_23(); break; case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : TH sends On command to DUT\n"); - if (ShouldSkip("OO.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 24 : TH reads Options attribute\n"); + if (ShouldSkip("LVL.S.A000f")) { NextTest(); return; } - err = TestThSendsOnCommandToDut_24(); + err = TestThReadsOptionsAttribute_24(); break; case 25: - ChipLogProgress(chipTool, " ***** Test Step 25 : TH sends a MoveToLevel command to the DUT with\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 25 : TH sends On command to DUT\n"); + if (ShouldSkip("OO.S.C01.Rsp")) { NextTest(); return; } - err = TestThSendsAMoveToLevelCommandToTheDutWith_25(); + err = TestThSendsOnCommandToDut_25(); break; case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 26 : TH sends a MoveToLevel command to the DUT with\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_26(); + err = TestThSendsAMoveToLevelCommandToTheDutWith_26(); break; case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : TH sends Off command to DUT\n"); - if (ShouldSkip("OO.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 27 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestThSendsOffCommandToDut_27(); + err = TestThReadsCurrentLevelAttributeFromDut_27(); break; case 28: - ChipLogProgress(chipTool, " ***** Test Step 28 : TH sends a MoveToLevel command to the DUT with\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 28 : TH sends Off command to DUT\n"); + if (ShouldSkip("OO.S.C00.Rsp")) { NextTest(); return; } - err = TestThSendsAMoveToLevelCommandToTheDutWith_28(); + err = TestThSendsOffCommandToDut_28(); break; case 29: - ChipLogProgress(chipTool, " ***** Test Step 29 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 29 : TH sends a MoveToLevel command to the DUT with\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_29(); + err = TestThSendsAMoveToLevelCommandToTheDutWith_29(); break; case 30: - ChipLogProgress(chipTool, " ***** Test Step 30 : TH sends a MoveToLevel command to the DUT with\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 30 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestThSendsAMoveToLevelCommandToTheDutWith_30(); + err = TestThReadsCurrentLevelAttributeFromDut_30(); break; case 31: - ChipLogProgress(chipTool, " ***** Test Step 31 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 31 : TH sends a MoveToLevel command to the DUT with\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_31(); + err = TestThSendsAMoveToLevelCommandToTheDutWith_31(); break; case 32: - ChipLogProgress(chipTool, " ***** Test Step 32 : TH sends a MoveToLevel command to the DUT with\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 32 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestThSendsAMoveToLevelCommandToTheDutWith_32(); + err = TestThReadsCurrentLevelAttributeFromDut_32(); break; case 33: - ChipLogProgress(chipTool, " ***** Test Step 33 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 33 : TH sends a MoveToLevel command to the DUT with\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_33(); + err = TestThSendsAMoveToLevelCommandToTheDutWith_33(); break; case 34: - ChipLogProgress(chipTool, " ***** Test Step 34 : TH writes 1 to the Options attribute\n"); - if (ShouldSkip("LVL.S.A000f")) { + ChipLogProgress(chipTool, " ***** Test Step 34 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestThWrites1ToTheOptionsAttribute_34(); + err = TestThReadsCurrentLevelAttributeFromDut_34(); break; case 35: - ChipLogProgress(chipTool, " ***** Test Step 35 : TH reads Options attribute\n"); + ChipLogProgress(chipTool, " ***** Test Step 35 : TH writes 1 to the Options attribute\n"); if (ShouldSkip("LVL.S.A000f")) { NextTest(); return; } - err = TestThReadsOptionsAttribute_35(); + err = TestThWrites1ToTheOptionsAttribute_35(); break; case 36: - ChipLogProgress(chipTool, " ***** Test Step 36 : TH sends On command to DUT\n"); - if (ShouldSkip("OO.S.C01.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 36 : TH reads Options attribute\n"); + if (ShouldSkip("LVL.S.A000f")) { NextTest(); return; } - err = TestThSendsOnCommandToDut_36(); + err = TestThReadsOptionsAttribute_36(); break; case 37: - ChipLogProgress(chipTool, " ***** Test Step 37 : TH sends a MoveToLevel command to the DUT with\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 37 : TH sends On command to DUT\n"); + if (ShouldSkip("OO.S.C01.Rsp")) { NextTest(); return; } - err = TestThSendsAMoveToLevelCommandToTheDutWith_37(); + err = TestThSendsOnCommandToDut_37(); break; case 38: - ChipLogProgress(chipTool, " ***** Test Step 38 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 38 : TH sends a MoveToLevel command to the DUT with\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_38(); + err = TestThSendsAMoveToLevelCommandToTheDutWith_38(); break; case 39: - ChipLogProgress(chipTool, " ***** Test Step 39 : TH sends Off command to DUT\n"); - if (ShouldSkip("OO.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 39 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestThSendsOffCommandToDut_39(); + err = TestThReadsCurrentLevelAttributeFromDut_39(); break; case 40: - ChipLogProgress(chipTool, " ***** Test Step 40 : TH sends a MoveToLevel command to the DUT with\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 40 : TH sends Off command to DUT\n"); + if (ShouldSkip("OO.S.C00.Rsp")) { NextTest(); return; } - err = TestThSendsAMoveToLevelCommandToTheDutWith_40(); + err = TestThSendsOffCommandToDut_40(); break; case 41: - ChipLogProgress(chipTool, " ***** Test Step 41 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 41 : TH sends a MoveToLevel command to the DUT with\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_41(); + err = TestThSendsAMoveToLevelCommandToTheDutWith_41(); break; case 42: - ChipLogProgress(chipTool, " ***** Test Step 42 : TH sends a MoveToLevel command to the DUT with\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 42 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestThSendsAMoveToLevelCommandToTheDutWith_42(); + err = TestThReadsCurrentLevelAttributeFromDut_42(); break; case 43: - ChipLogProgress(chipTool, " ***** Test Step 43 : TH reads CurrentLevel attribute from DUT\n"); - if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { + ChipLogProgress(chipTool, " ***** Test Step 43 : TH sends a MoveToLevel command to the DUT with\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_43(); + err = TestThSendsAMoveToLevelCommandToTheDutWith_43(); break; case 44: - ChipLogProgress(chipTool, " ***** Test Step 44 : TH sends a MoveToLevel command to the DUT with\n"); - if (ShouldSkip("LVL.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 44 : TH reads CurrentLevel attribute from DUT\n"); + if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestThSendsAMoveToLevelCommandToTheDutWith_44(); + err = TestThReadsCurrentLevelAttributeFromDut_44(); break; case 45: - ChipLogProgress(chipTool, " ***** Test Step 45 : TH reads CurrentLevel attribute from DUT\n"); + ChipLogProgress(chipTool, " ***** Test Step 45 : TH sends a MoveToLevel command to the DUT with\n"); + if (ShouldSkip("LVL.S.C00.Rsp")) { + NextTest(); + return; + } + err = TestThSendsAMoveToLevelCommandToTheDutWith_45(); + break; + case 46: + ChipLogProgress(chipTool, " ***** Test Step 46 : TH reads CurrentLevel attribute from DUT\n"); if (ShouldSkip("LVL.S.C00.Rsp && LVL.S.A0000")) { NextTest(); return; } - err = TestThReadsCurrentLevelAttributeFromDut_45(); + err = TestThReadsCurrentLevelAttributeFromDut_46(); break; } @@ -32947,6 +32286,9 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { case 45: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 46: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -32960,7 +32302,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 46; + const uint16_t mTestCount = 47; chip::Optional mNodeId; chip::Optional mCluster; @@ -33061,7 +32403,28 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsOffCommandToDut_5() + CHIP_ERROR TestThWritesNullToTheOnLevelAttribute_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterLevelControl alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id onLevelArgument; + onLevelArgument = nil; + [cluster writeAttributeOnLevelWithValue:onLevelArgument + completion:^(NSError * _Nullable err) { + NSLog(@"TH writes NULL to the OnLevel attribute Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsOffCommandToDut_6() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33079,7 +32442,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveToLevelWithOnOffCommandToDutWithLevel50AndTransitionTime0Immediate_6() + CHIP_ERROR TestThSendsAMoveToLevelWithOnOffCommandToDutWithLevel50AndTransitionTime0Immediate_7() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33105,7 +32468,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOnOffAttributeOnOffClusterFromDut_7() + CHIP_ERROR TestThReadsOnOffAttributeOnOffClusterFromDut_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33128,7 +32491,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_8() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33152,7 +32515,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsOnCommandToDut_9() + CHIP_ERROR TestThSendsOnCommandToDut_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33170,7 +32533,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_10() + CHIP_ERROR TestThSendsAMoveToLevelCommandToDutWithLevel50AndTransitionTime0Immediate_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33197,7 +32560,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_11() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33222,7 +32585,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { } CHIP_ERROR - TestThSendsAMoveToLevelCommandToTheDutWithLevel200AndTransitionTime30030SThisMeansTheLevelShouldIncreaseBy150UnitsIn30sSo5UnitsS_12() + TestThSendsAMoveToLevelCommandToTheDutWithLevel200AndTransitionTime30030SThisMeansTheLevelShouldIncreaseBy150UnitsIn30sSo5UnitsS_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33248,7 +32611,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait10000ms_13() + CHIP_ERROR TestWait10000ms_14() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; @@ -33256,7 +32619,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_14() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33280,7 +32643,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait10000ms_15() + CHIP_ERROR TestWait10000ms_16() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; @@ -33288,7 +32651,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_16() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33312,7 +32675,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait10000ms_17() + CHIP_ERROR TestWait10000ms_18() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; @@ -33320,7 +32683,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_18() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33344,7 +32707,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWait5000ms_19() + CHIP_ERROR TestWait5000ms_20() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; @@ -33352,7 +32715,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return WaitForMs("alpha", value); } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_20() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33376,7 +32739,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_21() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33400,7 +32763,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThWrites0ToTheOptionsAttribute_22() + CHIP_ERROR TestThWrites0ToTheOptionsAttribute_23() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33421,7 +32784,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionsAttribute_23() + CHIP_ERROR TestThReadsOptionsAttribute_24() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33444,7 +32807,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsOnCommandToDut_24() + CHIP_ERROR TestThSendsOnCommandToDut_25() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33462,7 +32825,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_25() + CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_26() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33486,7 +32849,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_26() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_27() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33510,7 +32873,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsOffCommandToDut_27() + CHIP_ERROR TestThSendsOffCommandToDut_28() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33528,7 +32891,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_28() + CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_29() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33552,7 +32915,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_29() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_30() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33576,7 +32939,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_30() + CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_31() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33600,7 +32963,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_31() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_32() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33624,7 +32987,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_32() + CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_33() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33648,7 +33011,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_33() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_34() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33672,7 +33035,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThWrites1ToTheOptionsAttribute_34() + CHIP_ERROR TestThWrites1ToTheOptionsAttribute_35() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33693,7 +33056,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsOptionsAttribute_35() + CHIP_ERROR TestThReadsOptionsAttribute_36() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33716,7 +33079,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsOnCommandToDut_36() + CHIP_ERROR TestThSendsOnCommandToDut_37() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33734,7 +33097,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_37() + CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_38() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33758,7 +33121,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_38() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_39() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33782,7 +33145,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsOffCommandToDut_39() + CHIP_ERROR TestThSendsOffCommandToDut_40() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33800,7 +33163,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_40() + CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_41() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33824,7 +33187,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_41() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_42() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33848,7 +33211,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_42() + CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_43() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33872,7 +33235,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_43() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_44() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33896,7 +33259,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_44() + CHIP_ERROR TestThSendsAMoveToLevelCommandToTheDutWith_45() { MTRBaseDevice * device = GetDevice("alpha"); @@ -33920,7 +33283,7 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_45() + CHIP_ERROR TestThReadsCurrentLevelAttributeFromDut_46() { MTRBaseDevice * device = GetDevice("alpha"); @@ -41619,261 +40982,9 @@ class Test_TC_ALOGIN_1_12 : public TestCommandBridge { case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - } - - // Go on to the next test. - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - - chip::System::Clock::Timeout GetWaitDuration() const override - { - return chip::System::Clock::Seconds16(mTimeout.ValueOr(kTimeoutInSeconds)); - } - -private: - std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 6; - - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() - { - - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee("alpha", value); - } - - CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); - } - - VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: FeatureMap Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); - } - - VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AttributeList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); - VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_ALOGIN_12_1 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_ALOGIN_12_1() - : TestCommandBridge("Test_TC_ALOGIN_12_1") - , mTestIndex(0) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("TempAccountIdentifier", &mTempAccountIdentifier); - AddArgument("catalogVendorId", 0, UINT16_MAX, &mCatalogVendorId); - AddArgument("applicationId", &mApplicationId); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - - ~Test_TC_ALOGIN_12_1() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_ALOGIN_12_1\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_ALOGIN_12_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 : Launch an app with the provided a application ID\n"); - if (ShouldSkip("APPLAUNCHER.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestLaunchAnAppWithTheProvidedAApplicationId_1(); - break; - case 2: - ChipLogProgress(chipTool, - " ***** Test Step 2 : TH sends a GetSetupPIN command to the DUT with test values provided by the product maker.\n"); - if (ShouldSkip("ALOGIN.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestThSendsAGetSetupPINCommandToTheDutWithTestValuesProvidedByTheProductMaker_2(); - break; - case 3: - ChipLogProgress(chipTool, - " ***** Test Step 3 : TH sends a Login command to the DUT with test values provided by the product maker.\n"); - if (ShouldSkip("ALOGIN.S.C02.Rsp")) { - NextTest(); - return; - } - err = TestThSendsALoginCommandToTheDutWithTestValuesProvidedByTheProductMaker_3(); - break; - case 4: - ChipLogProgress(chipTool, - " ***** Test Step 4 : TH sends a Logout command to the DUT with test values provided by the product maker.\n"); - if (ShouldSkip("ALOGIN.S.C03.Rsp")) { - NextTest(); - return; - } - err = TestThSendsALogoutCommandToTheDutWithTestValuesProvidedByTheProductMaker_4(); - break; - } - - if (CHIP_NO_ERROR != err) { - ChipLogError(chipTool, " ***** Test Failure: %s\n", chip::ErrorStr(err)); - SetCommandExitStatus(err); - } - } - - void OnStatusUpdate(const chip::app::StatusIB & status) override - { - switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -41887,14 +40998,11 @@ class Test_TC_ALOGIN_12_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 5; + const uint16_t mTestCount = 6; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; - chip::Optional mTempAccountIdentifier; - chip::Optional mCatalogVendorId; - chip::Optional mApplicationId; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -41905,117 +41013,117 @@ class Test_TC_ALOGIN_12_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestLaunchAnAppWithTheProvidedAApplicationId_1() + CHIP_ERROR TestReadTheGlobalAttributeClusterRevision_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterApplicationLauncher alloc] initWithDevice:device - endpointID:@(3) - queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRApplicationLauncherClusterLaunchAppParams alloc] init]; - params.application = [[MTRApplicationLauncherClusterApplicationStruct alloc] init]; - ((MTRApplicationLauncherClusterApplicationStruct *) params.application).catalogVendorID = mCatalogVendorId.HasValue() - ? [NSNumber numberWithUnsignedShort:mCatalogVendorId.Value()] - : [NSNumber numberWithUnsignedShort:123U]; - ((MTRApplicationLauncherClusterApplicationStruct *) params.application).applicationID = mApplicationId.HasValue() - ? [[NSString alloc] initWithBytes:mApplicationId.Value().data() - length:mApplicationId.Value().size() - encoding:NSUTF8StringEncoding] - : @"exampleid"; - - params.data = [[NSData alloc] initWithBytes:"Hello World" length:11]; - [cluster - launchAppWithParams:params - completion:^(MTRApplicationLauncherClusterLauncherResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"Launch an app with the provided a application ID Error: %@", err); + [cluster readAttributeClusterRevisionWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: ClusterRevision Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - id actualValue = values.status; - VerifyOrReturn(CheckValue("Status", actualValue, 0U)); - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("ClusterRevision", actualValue, 1U)); + } - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("clusterRevision", "int16u", "int16u")); + NextTest(); + }]; return CHIP_NO_ERROR; } - NSString * _Nonnull setupPIN; - CHIP_ERROR TestThSendsAGetSetupPINCommandToTheDutWithTestValuesProvidedByTheProductMaker_2() + CHIP_ERROR TestReadTheGlobalAttributeFeatureMap_2() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRAccountLoginClusterGetSetupPINParams alloc] init]; - params.tempAccountIdentifier = mTempAccountIdentifier.HasValue() - ? [[NSString alloc] initWithBytes:mTempAccountIdentifier.Value().data() - length:mTempAccountIdentifier.Value().size() - encoding:NSUTF8StringEncoding] - : @"1111"; - [cluster - getSetupPINWithParams:params - completion:^(MTRAccountLoginClusterGetSetupPINResponseParams * _Nullable values, NSError * _Nullable err) { - NSLog(@"TH sends a GetSetupPIN command to the DUT with test values provided by the product maker. " - @"Error: %@", - err); + [cluster readAttributeFeatureMapWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: FeatureMap Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - { - setupPIN = values.setupPIN; - } + { + id actualValue = value; + VerifyOrReturn(CheckValue("FeatureMap", actualValue, 0UL)); + } - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("featureMap", "bitmap32", "bitmap32")); + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsALoginCommandToTheDutWithTestValuesProvidedByTheProductMaker_3() + CHIP_ERROR TestReadTheGlobalAttributeAttributeList_3() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRAccountLoginClusterLoginParams alloc] init]; - params.tempAccountIdentifier = mTempAccountIdentifier.HasValue() - ? [[NSString alloc] initWithBytes:mTempAccountIdentifier.Value().data() - length:mTempAccountIdentifier.Value().size() - encoding:NSUTF8StringEncoding] - : @"1111"; - params.setupPIN = [setupPIN copy]; - [cluster - loginWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"TH sends a Login command to the DUT with test values provided by the product maker. Error: %@", err); + [cluster readAttributeAttributeListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AttributeList Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 65533UL)); + + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsALogoutCommandToTheDutWithTestValuesProvidedByTheProductMaker_4() + CHIP_ERROR TestReadTheGlobalAttributeAcceptedCommandList_4() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster logoutWithCompletion:^(NSError * _Nullable err) { - NSLog(@"TH sends a Logout command to the DUT with test values provided by the product maker. Error: %@", err); + [cluster readAttributeAcceptedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: AcceptedCommandList Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckConstraintType("acceptedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 2UL)); + VerifyOrReturn(CheckConstraintContains("acceptedCommandList", value, 3UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadTheGlobalAttributeGeneratedCommandList_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterAccountLogin alloc] initWithDevice:device endpointID:@(3) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeGeneratedCommandListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"Read the global attribute: GeneratedCommandList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("generatedCommandList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("generatedCommandList", value, 1UL)); + NextTest(); }]; @@ -43387,185 +42495,8 @@ class Test_TC_MEDIAINPUT_3_12 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR - TestThReadsTheInputListAttributeFromTheDutToShowListOfInputsAvailableAndVerifyListOfAvailableInputsSupportedByTheDeviceIsProvidedWhereEachEntryInTheListContainsAnIndextypeuint8InputTypeInputTypeEnumsNameTypeStringsAndDescriptionTypeString_1() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeInputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"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) Error: %@", - err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestShowInputStatusCommand_2() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster showInputStatusWithCompletion:^(NSError * _Nullable err) { - NSLog(@"Show Input Status Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestHideInputStatusCommand_3() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster hideInputStatusWithCompletion:^(NSError * _Nullable err) { - NSLog(@"Hide Input Status Command Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } -}; - -class Test_TC_MEDIAINPUT_3_13 : public TestCommandBridge { -public: - // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_MEDIAINPUT_3_13() - : TestCommandBridge("Test_TC_MEDIAINPUT_3_13") - , 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_MEDIAINPUT_3_13() {} - - /////////// TestCommand Interface ///////// - void NextTest() override - { - CHIP_ERROR err = CHIP_NO_ERROR; - - if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_MEDIAINPUT_3_13\n"); - } - - if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MEDIAINPUT_3_13\n"); - SetCommandExitStatus(CHIP_NO_ERROR); - return; - } - - Wait(); - - // Ensure we increment mTestIndex before we start running the relevant - // command. That way if we lose the timeslice after we send the message - // but before our function call returns, we won't end up with an - // incorrect mTestIndex value observed when we get the response. - switch (mTestIndex++) { - case 0: - ChipLogProgress(chipTool, " ***** Test Step 0 : Wait for the commissioned device to be retrieved\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); - break; - case 1: - ChipLogProgress( - chipTool, " ***** Test Step 1 : TH reads the InputList attribute from the DUT to show list of Inputs available\n"); - if (ShouldSkip("MEDIAINPUT.S.A0000")) { - NextTest(); - return; - } - err = TestThReadsTheInputListAttributeFromTheDutToShowListOfInputsAvailable_1(); - break; - case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Rename Input Command\n"); - if (ShouldSkip("MEDIAINPUT.S.C03.Rsp")) { - NextTest(); - return; - } - err = TestRenameInputCommand_2(); - break; - case 3: - ChipLogProgress( - chipTool, " ***** Test Step 3 : TH reads the InputList attribute from the DUT to show list of Inputs available\n"); - if (ShouldSkip("PICS_USER_PROMPT && MEDIAINPUT.S.A0000 && MEDIAINPUT.S.C03.Rsp")) { - NextTest(); - return; - } - err = TestThReadsTheInputListAttributeFromTheDutToShowListOfInputsAvailable_3(); - 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; - } - - // 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 = 4; - - 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 TestThReadsTheInputListAttributeFromTheDutToShowListOfInputsAvailable_1() + CHIP_ERROR + TestThReadsTheInputListAttributeFromTheDutToShowListOfInputsAvailableAndVerifyListOfAvailableInputsSupportedByTheDeviceIsProvidedWhereEachEntryInTheListContainsAnIndextypeuint8InputTypeInputTypeEnumsNameTypeStringsAndDescriptionTypeString_1() { MTRBaseDevice * device = GetDevice("alpha"); @@ -43573,7 +42504,10 @@ class Test_TC_MEDIAINPUT_3_13 : public TestCommandBridge { VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); [cluster readAttributeInputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the InputList attribute from the DUT to show list of Inputs available Error: %@", err); + NSLog(@"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) Error: %@", + err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -43583,44 +42517,48 @@ class Test_TC_MEDIAINPUT_3_13 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRenameInputCommand_2() + CHIP_ERROR TestShowInputStatusCommand_2() { MTRBaseDevice * device = GetDevice("alpha"); __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - __auto_type * params = [[MTRMediaInputClusterRenameInputParams alloc] init]; - params.index = [NSNumber numberWithUnsignedChar:1U]; - params.name = @"A1"; - [cluster renameInputWithParams:params - completion:^(NSError * _Nullable err) { - NSLog(@"Rename Input Command Error: %@", err); + [cluster showInputStatusWithCompletion:^(NSError * _Nullable err) { + NSLog(@"Show Input Status Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsTheInputListAttributeFromTheDutToShowListOfInputsAvailable_3() + CHIP_ERROR TestHideInputStatusCommand_3() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster hideInputStatusWithCompletion:^(NSError * _Nullable err) { + NSLog(@"Hide Input Status Command Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; } }; -class Test_TC_WAKEONLAN_4_1 : public TestCommandBridge { +class Test_TC_MEDIAINPUT_3_13 : public TestCommandBridge { public: // NOLINTBEGIN(clang-analyzer-nullability.NullPassedToNonnull): Test constructor nullability not enforced - Test_TC_WAKEONLAN_4_1() - : TestCommandBridge("Test_TC_WAKEONLAN_4_1") + Test_TC_MEDIAINPUT_3_13() + : TestCommandBridge("Test_TC_MEDIAINPUT_3_13") , mTestIndex(0) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); @@ -43630,7 +42568,7 @@ class Test_TC_WAKEONLAN_4_1 : public TestCommandBridge { } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) - ~Test_TC_WAKEONLAN_4_1() {} + ~Test_TC_MEDIAINPUT_3_13() {} /////////// TestCommand Interface ///////// void NextTest() override @@ -43638,11 +42576,11 @@ class Test_TC_WAKEONLAN_4_1 : public TestCommandBridge { CHIP_ERROR err = CHIP_NO_ERROR; if (0 == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Start: Test_TC_WAKEONLAN_4_1\n"); + ChipLogProgress(chipTool, " **** Test Start: Test_TC_MEDIAINPUT_3_13\n"); } if (mTestCount == mTestIndex) { - ChipLogProgress(chipTool, " **** Test Complete: Test_TC_WAKEONLAN_4_1\n"); + ChipLogProgress(chipTool, " **** Test Complete: Test_TC_MEDIAINPUT_3_13\n"); SetCommandExitStatus(CHIP_NO_ERROR); return; } @@ -43659,29 +42597,30 @@ class Test_TC_WAKEONLAN_4_1 : public TestCommandBridge { err = TestWaitForTheCommissionedDeviceToBeRetrieved_0(); break; case 1: - ChipLogProgress(chipTool, " ***** Test Step 1 : TH reads the MACAddress attribute from the DUT\n"); - if (ShouldSkip("WAKEONLAN.S.A0000")) { + ChipLogProgress( + chipTool, " ***** Test Step 1 : TH reads the InputList attribute from the DUT to show list of Inputs available\n"); + if (ShouldSkip("MEDIAINPUT.S.A0000")) { NextTest(); return; } - err = TestThReadsTheMACAddressAttributeFromTheDut_1(); + err = TestThReadsTheInputListAttributeFromTheDutToShowListOfInputsAvailable_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : TH sends a Sleep command to DUT\n"); - if (ShouldSkip("LOWPOWER.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 2 : Rename Input Command\n"); + if (ShouldSkip("MEDIAINPUT.S.C03.Rsp")) { NextTest(); return; } - err = TestThSendsASleepCommandToDut_2(); + err = TestRenameInputCommand_2(); break; case 3: ChipLogProgress( - chipTool, " ***** Test Step 3 : TH sends a Wake-On LAN magic packet containing the MAC address from step 1\n"); - if (ShouldSkip("PICS_USER_PROMPT")) { + chipTool, " ***** Test Step 3 : TH reads the InputList attribute from the DUT to show list of Inputs available\n"); + if (ShouldSkip("PICS_USER_PROMPT && MEDIAINPUT.S.A0000 && MEDIAINPUT.S.C03.Rsp")) { NextTest(); return; } - err = TestThSendsAWakeOnLanMagicPacketContainingTheMacAddressFromStep1_3(); + err = TestThReadsTheInputListAttributeFromTheDutToShowListOfInputsAvailable_3(); break; } @@ -43734,48 +42673,51 @@ class Test_TC_WAKEONLAN_4_1 : public TestCommandBridge { return WaitForCommissionee("alpha", value); } - CHIP_ERROR TestThReadsTheMACAddressAttributeFromTheDut_1() + CHIP_ERROR TestThReadsTheInputListAttributeFromTheDutToShowListOfInputsAvailable_1() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterWakeOnLAN alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster readAttributeMACAddressWithCompletion:^(NSString * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH reads the MACAddress attribute from the DUT Error: %@", err); + [cluster readAttributeInputListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the InputList attribute from the DUT to show list of Inputs available Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - VerifyOrReturn(CheckConstraintMinLength("MACAddress", value, 12)); NextTest(); }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsASleepCommandToDut_2() + CHIP_ERROR TestRenameInputCommand_2() { MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterLowPower alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + __auto_type * cluster = [[MTRBaseClusterMediaInput alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - [cluster sleepWithCompletion:^(NSError * _Nullable err) { - NSLog(@"TH sends a Sleep command to DUT Error: %@", err); + __auto_type * params = [[MTRMediaInputClusterRenameInputParams alloc] init]; + params.index = [NSNumber numberWithUnsignedChar:1U]; + params.name = @"A1"; + [cluster renameInputWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Rename Input Command Error: %@", err); - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - NextTest(); - }]; + NextTest(); + }]; return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAWakeOnLanMagicPacketContainingTheMacAddressFromStep1_3() + CHIP_ERROR TestThReadsTheInputListAttributeFromTheDutToShowListOfInputsAvailable_3() { chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' after successgarbage: not in length on purpose", 30); + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); value.expectedValue.Emplace(); value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); return UserPrompt("alpha", value); @@ -58431,87 +57373,223 @@ class Test_TC_SC_5_1 : public TestCommandBridge { 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 sends KeySetWrite command with incorrect key\n"); - err = TestThSendsKeySetWriteCommandWithIncorrectKey_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 TH key\n"); - err = TestThSendsKeySetWriteCommandWithThKey_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 binds GroupId to GroupKeySet\n"); - err = TestThBindsGroupIdToGroupKeySet_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 RemoveAllGroups command\n"); - err = TestThSendsRemoveAllGroupsCommand_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 AddGroup command\n"); - err = TestThSendsAddGroupCommand_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 sends ViewGroup command\n"); - if (ShouldSkip("G.S.F00")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : TH binds GroupId to GroupKeySet\n"); + if (ShouldSkip("PICS_SDK_CI_ONLY")) { NextTest(); return; } - err = TestThSendsViewGroupCommand_8(); + err = TestThBindsGroupIdToGroupKeySet_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH sends ViewGroup command\n"); - if (ShouldSkip("!(G.S.F00)")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : TH binds GroupId to GroupKeySet\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { NextTest(); return; } - err = TestThSendsViewGroupCommand_9(); + err = TestThBindsGroupIdToGroupKeySet_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends KeySetRead\n"); - err = TestThSendsKeySetRead_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends RemoveAllGroups command\n"); + err = TestThSendsRemoveAllGroupsCommand_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH reads GroupKeyMap Attribute from the GroupKeyManagement cluster\n"); - err = TestThReadsGroupKeyMapAttributeFromTheGroupKeyManagementCluster_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : TH sends AddGroup command\n"); + err = TestThSendsAddGroupCommand_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads GroupTable attribute\n"); + ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends ViewGroup command\n"); if (ShouldSkip("G.S.F00")) { NextTest(); return; } - err = TestThReadsGroupTableAttribute_12(); + err = TestThSendsViewGroupCommand_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH reads GroupTable attribute\n"); + ChipLogProgress(chipTool, " ***** Test Step 13 : TH sends ViewGroup command\n"); if (ShouldSkip("!(G.S.F00)")) { NextTest(); return; } - err = TestThReadsGroupTableAttribute_13(); + err = TestThSendsViewGroupCommand_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : TH removes the GroupKeySet\n"); - err = TestThRemovesTheGroupKeySet_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 verifies the corresponding GroupKeyMap entry has been removed\n"); - err = TestThVerifiesTheCorrespondingGroupKeyMapEntryHasBeenRemoved_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 cleans up groups using RemoveAllGroups command\n"); - err = TestThCleansUpGroupsUsingRemoveAllGroupsCommand_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 verifies the group has been removed in the GroupTable\n"); - err = TestThVerifiesTheGroupHasBeenRemovedInTheGroupTable_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 removes ACL Operate privileges for Group 0x0103\n"); - err = TestThRemovesAclOperatePrivilegesForGroup0x0103_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; } @@ -58581,6 +57659,42 @@ class Test_TC_SC_5_1 : public TestCommandBridge { 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. @@ -58594,7 +57708,7 @@ class Test_TC_SC_5_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 19; + const uint16_t mTestCount = 31; chip::Optional mNodeId; chip::Optional mCluster; @@ -58668,7 +57782,17 @@ class Test_TC_SC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsKeySetWriteCommandWithIncorrectKey_3() + 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"); @@ -58708,7 +57832,17 @@ class Test_TC_SC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsKeySetWriteCommandWithThKey_4() + 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"); @@ -58748,7 +57882,17 @@ class Test_TC_SC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThBindsGroupIdToGroupKeySet_5() + 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"); @@ -58779,7 +57923,17 @@ class Test_TC_SC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsRemoveAllGroupsCommand_6() + 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"); @@ -58797,7 +57951,7 @@ class Test_TC_SC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsAddGroupCommand_7() + CHIP_ERROR TestThSendsAddGroupCommand_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -58819,7 +57973,7 @@ class Test_TC_SC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsViewGroupCommand_8() + CHIP_ERROR TestThSendsViewGroupCommand_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -58855,7 +58009,7 @@ class Test_TC_SC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsViewGroupCommand_9() + CHIP_ERROR TestThSendsViewGroupCommand_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -58891,7 +58045,7 @@ class Test_TC_SC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsKeySetRead_10() + CHIP_ERROR TestThSendsKeySetRead_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -58942,7 +58096,17 @@ class Test_TC_SC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsGroupKeyMapAttributeFromTheGroupKeyManagementCluster_11() + 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"); @@ -58980,7 +58144,17 @@ class Test_TC_SC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsGroupTableAttribute_12() + 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"); @@ -59021,7 +58195,17 @@ class Test_TC_SC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsGroupTableAttribute_13() + 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"); @@ -59061,7 +58245,17 @@ class Test_TC_SC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThRemovesTheGroupKeySet_14() + 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"); @@ -59084,7 +58278,17 @@ class Test_TC_SC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThVerifiesTheCorrespondingGroupKeyMapEntryHasBeenRemoved_15() + 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"); @@ -59114,7 +58318,17 @@ class Test_TC_SC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThCleansUpGroupsUsingRemoveAllGroupsCommand_16() + 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"); @@ -59132,7 +58346,7 @@ class Test_TC_SC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThVerifiesTheGroupHasBeenRemovedInTheGroupTable_17() + CHIP_ERROR TestThVerifiesTheGroupHasBeenRemovedInTheGroupTable_27() { MTRBaseDevice * device = GetDevice("alpha"); @@ -59161,7 +58375,17 @@ class Test_TC_SC_5_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThRemovesAclOperatePrivilegesForGroup0x0103_18() + 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"); @@ -59195,6 +58419,16 @@ class Test_TC_SC_5_1 : public TestCommandBridge { 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 { @@ -62699,7 +61933,7 @@ class Test_TC_DGTHREAD_1_1 : public TestCommandBridge { case 8: ChipLogProgress( chipTool, " ***** Test Step 8 : TH reads Feature dependent attribute(DGTHREAD.S.F01(ERRCNT)) in attributeList\n"); - if (ShouldSkip("DGTHREAD.C.A0006 && DGTHREAD.S.F01")) { + if (ShouldSkip("DGTHREAD.S.A0006 && DGTHREAD.S.F01")) { NextTest(); return; } @@ -124986,7 +124220,7 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 6 : TH writes the RequirePINforRemoteOperation attribute value as False on the DUT and Verify " "DUT responds with UNSUPPORTED_WRITE\n"); - if (ShouldSkip("DRLK.S.F07 && DRLK.S.F00 && ! DRLK.S.A0033")) { + if (ShouldSkip("DRLK.S.F07 && DRLK.S.F00 && !DRLK.S.A0033")) { NextTest(); return; } @@ -125029,7 +124263,7 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 11 : TH writes the RequirePINforRemoteOperation attribute value as False on the DUT and Verify " "DUT responds with UNSUPPORTED_WRITE\n"); - if (ShouldSkip("DRLK.S.F07 && DRLK.S.F00 && ! DRLK.S.A0033")) { + if (ShouldSkip("DRLK.S.F07 && DRLK.S.F00 && !DRLK.S.A0033")) { NextTest(); return; } @@ -125143,7 +124377,7 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 24 : TH reads the UserCodeTemporaryDisableTime attribute from the DUT and check attribute is " "triggered\n"); - if (ShouldSkip("DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0031")) { + if (ShouldSkip("DRLK.S.F00 && DRLK.S.F01 && DRLK.S.A0031")) { NextTest(); return; } @@ -128088,8 +127322,12 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { err = TestClearAYearDayScheduleForTheFirstUser_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : Cleanup the created user\n"); - err = TestCleanupTheCreatedUser_17(); + ChipLogProgress(chipTool, " ***** Test Step 17 : Cleanup the created user with UserIndex 1\n"); + err = TestCleanupTheCreatedUserWithUserIndex1_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : Cleanup the created user with UserIndex 5\n"); + err = TestCleanupTheCreatedUserWithUserIndex5_18(); break; } @@ -128156,6 +127394,9 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -128169,7 +127410,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 18; + const uint16_t mTestCount = 19; chip::Optional mNodeId; chip::Optional mCluster; @@ -128762,7 +128003,7 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCleanupTheCreatedUser_17() + CHIP_ERROR TestCleanupTheCreatedUserWithUserIndex1_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -128773,7 +128014,28 @@ class Test_TC_DRLK_2_7 : public TestCommandBridge { params.userIndex = [NSNumber numberWithUnsignedShort:1U]; [cluster clearUserWithParams:params completion:^(NSError * _Nullable err) { - NSLog(@"Cleanup the created user Error: %@", err); + NSLog(@"Cleanup the created user with UserIndex 1 Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestCleanupTheCreatedUserWithUserIndex5_18() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRDoorLockClusterClearUserParams alloc] init]; + params.userIndex = [NSNumber numberWithUnsignedShort:5U]; + [cluster clearUserWithParams:params + completion:^(NSError * _Nullable err) { + NSLog(@"Cleanup the created user with UserIndex 5 Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -129339,12 +128601,6 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { VerifyOrReturn(CheckValueNull("UserIndex", actualValue)); } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("NextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("NextCredentialIndex", actualValue, 3U)); - } - NextTest(); }]; @@ -129385,12 +128641,6 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { VerifyOrReturn(CheckValueNull("UserIndex", actualValue)); } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("NextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("NextCredentialIndex", actualValue, 3U)); - } - NextTest(); }]; @@ -129565,12 +128815,6 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { VerifyOrReturn(CheckValueNull("UserIndex", actualValue)); } - { - id actualValue = values.nextCredentialIndex; - VerifyOrReturn(CheckValueNonNull("NextCredentialIndex", actualValue)); - VerifyOrReturn(CheckValue("NextCredentialIndex", actualValue, 2U)); - } - NextTest(); }]; @@ -129781,6 +129025,9 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("PINCredentialData", &mPINCredentialData); + AddArgument("RFIDCredentialData", &mRFIDCredentialData); + AddArgument("FingerVeinCredentialData", &mFingerVeinCredentialData); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } // NOLINTEND(clang-analyzer-nullability.NullPassedToNonnull) @@ -129822,124 +129069,164 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { err = TestReadTheUserBackAndVerifyItsFields_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH sends Set Credential Command to DUT with type PIN\n"); - if (ShouldSkip("DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { + ChipLogProgress(chipTool, " ***** Test Step 3 : TH reads NumberOfTotalUsersSupported and saves for future use.\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.A0011")) { NextTest(); return; } - err = TestThSendsSetCredentialCommandToDutWithTypePin_3(); + err = TestThReadsNumberOfTotalUsersSupportedAndSavesForFutureUse_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH sends Set Credential Command to DUT with type RFID\n"); - if (ShouldSkip("DRLK.S.F01 && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads MinPINCodeLength and saves for future use.\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.F00")) { NextTest(); return; } - err = TestThSendsSetCredentialCommandToDutWithTypeRfid_4(); + err = TestThReadsMinPINCodeLengthAndSavesForFutureUse_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends Set Credential Command to DUT with type FingerVein\n"); - if (ShouldSkip("DRLK.S.F02 && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads MaxPINCodeLength and saves for future use.\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.F00")) { NextTest(); return; } - err = TestThSendsSetCredentialCommandToDutWithTypeFingerVein_5(); + err = TestThReadsMaxPINCodeLengthAndSavesForFutureUse_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends Get Credential Status Command with type PIN\n"); - if (ShouldSkip("DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads MinRFIDCodeLength and saves for future use.\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.F01 && DRLK.S.A001a")) { NextTest(); return; } - err = TestThSendsGetCredentialStatusCommandWithTypePin_6(); + err = TestThReadsMinRFIDCodeLengthAndSavesForFutureUse_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH sends Get Credential Status Command with type RFID\n"); - if (ShouldSkip("DRLK.S.F01 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads MaxRFIDCodeLength and saves for future use.\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.F01 && DRLK.S.A0019")) { NextTest(); return; } - err = TestThSendsGetCredentialStatusCommandWithTypeRfid_7(); + err = TestThReadsMaxRFIDCodeLengthAndSavesForFutureUse_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH sends Get Credential Status Command with type FingerVein\n"); - if (ShouldSkip("DRLK.S.F02 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : TH sends Set Credential Command to DUT with type PIN\n"); + if (ShouldSkip("DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { NextTest(); return; } - err = TestThSendsGetCredentialStatusCommandWithTypeFingerVein_8(); + err = TestThSendsSetCredentialCommandToDutWithTypePin_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH sends Clear Credential Command to DUT with type PIN\n"); - if (ShouldSkip("DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C26.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : TH sends Set Credential Command to DUT with type RFID\n"); + if (ShouldSkip("DRLK.S.F01 && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { NextTest(); return; } - err = TestThSendsClearCredentialCommandToDutWithTypePin_9(); + err = TestThSendsSetCredentialCommandToDutWithTypeRfid_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends Get Credential Status Command with type RFID\n"); - if (ShouldSkip("DRLK.S.F01 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends Set Credential Command to DUT with type FingerVein\n"); + if (ShouldSkip("DRLK.S.F02 && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { NextTest(); return; } - err = TestThSendsGetCredentialStatusCommandWithTypeRfid_10(); + err = TestThSendsSetCredentialCommandToDutWithTypeFingerVein_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH sends Get Credential Status Command with type FingerVein\n"); - if (ShouldSkip("DRLK.S.F02 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : TH sends Get Credential Status Command with type PIN\n"); + if (ShouldSkip("DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { NextTest(); return; } - err = TestThSendsGetCredentialStatusCommandWithTypeFingerVein_11(); + err = TestThSendsGetCredentialStatusCommandWithTypePin_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends Clear Credential Command to DUT with type RFID\n"); - if (ShouldSkip("DRLK.S.F01 && DRLK.S.F08 && DRLK.S.C26.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends Get Credential Status Command with type RFID\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.F01 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { NextTest(); return; } - err = TestThSendsClearCredentialCommandToDutWithTypeRfid_12(); + err = TestThSendsGetCredentialStatusCommandWithTypeRfid_12(); break; case 13: ChipLogProgress(chipTool, " ***** Test Step 13 : TH sends Get Credential Status Command with type FingerVein\n"); - if (ShouldSkip("DRLK.S.F02 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { + if (ShouldSkip("DRLK.S.F08 && DRLK.S.F02 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { NextTest(); return; } err = TestThSendsGetCredentialStatusCommandWithTypeFingerVein_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : TH sends Clear Credential Command to DUT with type FingerVein\n"); - if (ShouldSkip("DRLK.S.F02 && DRLK.S.F08 && DRLK.S.C26.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 14 : TH sends Clear Credential Command to DUT with type PIN\n"); + if (ShouldSkip("DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C26.Rsp")) { NextTest(); return; } - err = TestThSendsClearCredentialCommandToDutWithTypeFingerVein_14(); + err = TestThSendsClearCredentialCommandToDutWithTypePin_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH sends Get Credential Status Command to DUT with type PIN\n"); - if (ShouldSkip("DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { + ChipLogProgress(chipTool, " ***** Test Step 15 : TH sends Get Credential Status Command with type RFID\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.F01 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { NextTest(); return; } - err = TestThSendsGetCredentialStatusCommandToDutWithTypePin_15(); + err = TestThSendsGetCredentialStatusCommandWithTypeRfid_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : TH sends Get Credential Status Command to DUT with type RFID\n"); - if (ShouldSkip("DRLK.S.F01 && DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : TH sends Get Credential Status Command with type FingerVein\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.F02 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { NextTest(); return; } - err = TestThSendsGetCredentialStatusCommandToDutWithTypeRfid_16(); + err = TestThSendsGetCredentialStatusCommandWithTypeFingerVein_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : TH sends Get Credential Status Command to DUT with type FingerVein\n"); + ChipLogProgress(chipTool, " ***** Test Step 17 : TH sends Clear Credential Command to DUT with type RFID\n"); + if (ShouldSkip("DRLK.S.F01 && DRLK.S.F08 && DRLK.S.C26.Rsp")) { + NextTest(); + return; + } + err = TestThSendsClearCredentialCommandToDutWithTypeRfid_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : TH sends Get Credential Status Command with type FingerVein\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.F02 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { + NextTest(); + return; + } + err = TestThSendsGetCredentialStatusCommandWithTypeFingerVein_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : TH sends Clear Credential Command to DUT with type FingerVein\n"); + if (ShouldSkip("DRLK.S.F02 && DRLK.S.F08 && DRLK.S.C26.Rsp")) { + NextTest(); + return; + } + err = TestThSendsClearCredentialCommandToDutWithTypeFingerVein_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : TH sends Get Credential Status Command to DUT with type PIN\n"); + if (ShouldSkip("DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { + NextTest(); + return; + } + err = TestThSendsGetCredentialStatusCommandToDutWithTypePin_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : TH sends Get Credential Status Command to DUT with type RFID\n"); + if (ShouldSkip("DRLK.S.F01 && DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { + NextTest(); + return; + } + err = TestThSendsGetCredentialStatusCommandToDutWithTypeRfid_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : TH sends Get Credential Status Command to DUT with type FingerVein\n"); if (ShouldSkip("DRLK.S.F02 && DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { NextTest(); return; } - err = TestThSendsGetCredentialStatusCommandToDutWithTypeFingerVein_17(); + err = TestThSendsGetCredentialStatusCommandToDutWithTypeFingerVein_22(); break; } @@ -130006,6 +129293,21 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { 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; } // Go on to the next test. @@ -130019,11 +129321,14 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 18; + const uint16_t mTestCount = 23; chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mPINCredentialData; + chip::Optional mRFIDCredentialData; + chip::Optional mFingerVeinCredentialData; chip::Optional mTimeout; CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrieved_0() @@ -130140,7 +129445,112 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsSetCredentialCommandToDutWithTypePin_3() + CHIP_ERROR TestThReadsNumberOfTotalUsersSupportedAndSavesForFutureUse_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeNumberOfTotalUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads NumberOfTotalUsersSupported and saves for future use. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("numberOfTotalUsersSupported", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("numberOfTotalUsersSupported", [value unsignedShortValue], 65535U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsMinPINCodeLengthAndSavesForFutureUse_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMinPINCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads MinPINCodeLength and saves for future use. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("minPINCodeLength", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("minPINCodeLength", [value unsignedCharValue], 255U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsMaxPINCodeLengthAndSavesForFutureUse_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMaxPINCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads MaxPINCodeLength and saves for future use. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("maxPINCodeLength", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("maxPINCodeLength", [value unsignedCharValue], 255U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsMinRFIDCodeLengthAndSavesForFutureUse_6() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMinRFIDCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads MinRFIDCodeLength and saves for future use. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("minRFIDCodeLength", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("minRFIDCodeLength", [value unsignedCharValue], 255U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsMaxRFIDCodeLengthAndSavesForFutureUse_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMaxRFIDCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads MaxRFIDCodeLength and saves for future use. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("maxRFIDCodeLength", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("maxRFIDCodeLength", [value unsignedCharValue], 255U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsSetCredentialCommandToDutWithTypePin_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -130153,7 +129563,9 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; - params.credentialData = [[NSData alloc] initWithBytes:"123456" length:6]; + params.credentialData = mPINCredentialData.HasValue() + ? [NSData dataWithBytes:mPINCredentialData.Value().data() length:mPINCredentialData.Value().size()] + : [[NSData alloc] initWithBytes:"123456" length:6]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; params.userStatus = nil; params.userType = nil; @@ -130186,7 +129598,7 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsSetCredentialCommandToDutWithTypeRfid_4() + CHIP_ERROR TestThSendsSetCredentialCommandToDutWithTypeRfid_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -130199,7 +129611,9 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:2U]; ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; - params.credentialData = [[NSData alloc] initWithBytes:"RFIDTESTDATA" length:12]; + params.credentialData = mRFIDCredentialData.HasValue() + ? [NSData dataWithBytes:mRFIDCredentialData.Value().data() length:mRFIDCredentialData.Value().size()] + : [[NSData alloc] initWithBytes:"RFIDTESTDATA" length:12]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; params.userStatus = nil; params.userType = nil; @@ -130232,7 +129646,7 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsSetCredentialCommandToDutWithTypeFingerVein_5() + CHIP_ERROR TestThSendsSetCredentialCommandToDutWithTypeFingerVein_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -130245,7 +129659,9 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:4U]; ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:1U]; - params.credentialData = [[NSData alloc] initWithBytes:"123456" length:6]; + params.credentialData = mFingerVeinCredentialData.HasValue() + ? [NSData dataWithBytes:mFingerVeinCredentialData.Value().data() length:mFingerVeinCredentialData.Value().size()] + : [[NSData alloc] initWithBytes:"123456" length:6]; params.userIndex = [NSNumber numberWithUnsignedShort:1U]; params.userStatus = nil; params.userType = nil; @@ -130278,7 +129694,7 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsGetCredentialStatusCommandWithTypePin_6() + CHIP_ERROR TestThSendsGetCredentialStatusCommandWithTypePin_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -130332,7 +129748,7 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsGetCredentialStatusCommandWithTypeRfid_7() + CHIP_ERROR TestThSendsGetCredentialStatusCommandWithTypeRfid_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -130386,7 +129802,7 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsGetCredentialStatusCommandWithTypeFingerVein_8() + CHIP_ERROR TestThSendsGetCredentialStatusCommandWithTypeFingerVein_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -130440,7 +129856,7 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsClearCredentialCommandToDutWithTypePin_9() + CHIP_ERROR TestThSendsClearCredentialCommandToDutWithTypePin_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -130464,7 +129880,7 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsGetCredentialStatusCommandWithTypeRfid_10() + CHIP_ERROR TestThSendsGetCredentialStatusCommandWithTypeRfid_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -130518,7 +129934,7 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsGetCredentialStatusCommandWithTypeFingerVein_11() + CHIP_ERROR TestThSendsGetCredentialStatusCommandWithTypeFingerVein_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -130572,7 +129988,7 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsClearCredentialCommandToDutWithTypeRfid_12() + CHIP_ERROR TestThSendsClearCredentialCommandToDutWithTypeRfid_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -130596,7 +130012,7 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsGetCredentialStatusCommandWithTypeFingerVein_13() + CHIP_ERROR TestThSendsGetCredentialStatusCommandWithTypeFingerVein_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -130650,7 +130066,7 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsClearCredentialCommandToDutWithTypeFingerVein_14() + CHIP_ERROR TestThSendsClearCredentialCommandToDutWithTypeFingerVein_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -130674,7 +130090,7 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsGetCredentialStatusCommandToDutWithTypePin_15() + CHIP_ERROR TestThSendsGetCredentialStatusCommandToDutWithTypePin_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -130724,7 +130140,7 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsGetCredentialStatusCommandToDutWithTypeRfid_16() + CHIP_ERROR TestThSendsGetCredentialStatusCommandToDutWithTypeRfid_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -130774,7 +130190,7 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsGetCredentialStatusCommandToDutWithTypeFingerVein_17() + CHIP_ERROR TestThSendsGetCredentialStatusCommandToDutWithTypeFingerVein_22() { MTRBaseDevice * device = GetDevice("alpha"); @@ -134429,7 +133845,6 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), - make_unique(), make_unique(), make_unique(), make_unique(), @@ -134492,7 +133907,6 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), - make_unique(), make_unique(), make_unique(), make_unique(), @@ -134502,7 +133916,6 @@ void registerCommandsTests(Commands & commands) make_unique(), make_unique(), make_unique(), - make_unique(), make_unique(), make_unique(), make_unique(), diff --git a/zzz_generated/placeholder/app1/zap-generated/test/Commands.h b/zzz_generated/placeholder/app1/zap-generated/test/Commands.h index 4e02f06118f737..ae60cba97fc3b1 100644 --- a/zzz_generated/placeholder/app1/zap-generated/test/Commands.h +++ b/zzz_generated/placeholder/app1/zap-generated/test/Commands.h @@ -185,218 +185,6 @@ class Test_TC_BINFO_2_3_SimulatedSuite : public TestCommand } }; -class Test_TC_ACT_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_ACT_3_1_SimulatedSuite() : TestCommand("Test_TC_ACT_3_1_Simulated", 6) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ACT_3_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - 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, "Read attribute: ActionList"); - return WaitAttribute(GetEndpoint(0), Actions::Id, Actions::Attributes::ActionList::Id); - } - case 1: { - LogStep(1, "Read attribute: EndpointLists"); - return WaitAttribute(GetEndpoint(0), Actions::Id, Actions::Attributes::EndpointLists::Id); - } - case 2: { - LogStep(2, "Read attribute: SetupURL"); - return WaitAttribute(GetEndpoint(0), Actions::Id, Actions::Attributes::SetupURL::Id); - } - case 3: { - LogStep(3, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BOOL_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_BOOL_3_1_SimulatedSuite() : TestCommand("Test_TC_BOOL_3_1_Simulated", 4) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BOOL_3_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - 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, "Read attribute: StateValue"); - return WaitAttribute(GetEndpoint(0), BooleanState::Id, BooleanState::Attributes::StateValue::Id); - } - case 1: { - LogStep(1, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 3: { - LogStep(3, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - class Test_TC_DESC_2_2_SimulatedSuite : public TestCommand { public: @@ -624,571 +412,31 @@ class Test_TC_DGSW_3_1_SimulatedSuite : public TestCommand VerifyOrDo(!ShouldSkip("DGSW.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return WaitAttribute(GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Attributes::ThreadMetrics::Id); } - case 1: { - LogStep(1, "Read attribute: CurrentHeapFree"); - VerifyOrDo(!ShouldSkip("DGSW.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Attributes::CurrentHeapFree::Id); - } - case 2: { - LogStep(2, "Read attribute: CurrentHeapUsed"); - VerifyOrDo(!ShouldSkip("DGSW.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Attributes::CurrentHeapUsed::Id); - } - case 3: { - LogStep(3, "Read attribute: CurrentHeapHighWatermark"); - VerifyOrDo(!ShouldSkip("DGSW.C.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGWIFI_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_DGWIFI_3_1_SimulatedSuite() : TestCommand("Test_TC_DGWIFI_3_1_Simulated", 13) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGWIFI_3_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - 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) - { - case 0: { - LogStep(0, "Read attribute: BSSID"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::Bssid::Id); - } - case 1: { - LogStep(1, "Read attribute: SecurityType"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::SecurityType::Id); - } - case 2: { - LogStep(2, "Read attribute: WiFiVersion"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::WiFiVersion::Id); - } - case 3: { - LogStep(3, "Read attribute: ChannelNumber"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::ChannelNumber::Id); - } - case 4: { - LogStep(4, "Read attribute: RSSI"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::Rssi::Id); - } - case 5: { - LogStep(5, "Read attribute: BeaconLostCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::BeaconLostCount::Id); - } - case 6: { - LogStep(6, "Read attribute: BeaconRxCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::BeaconRxCount::Id); - } - case 7: { - LogStep(7, "Read attribute: PacketMulticastRxCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::Id); - } - case 8: { - LogStep(8, "Read attribute: PacketMulticastTxCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::Id); - } - case 9: { - LogStep(9, "Read attribute: PacketUnicastRxCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::Id); - } - case 10: { - LogStep(10, "Read attribute: PacketUnicastTxCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::Id); - } - case 11: { - LogStep(11, "Read attribute: CurrentMaxRate"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::Id); - } - case 12: { - LogStep(12, "Read attribute: OverrunCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A000c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::OverrunCount::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_FLW_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_FLW_3_1_SimulatedSuite() : TestCommand("Test_TC_FLW_3_1_Simulated", 7) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_FLW_3_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Read attribute: MeasuredValue"); - return WaitAttribute(GetEndpoint(0), FlowMeasurement::Id, FlowMeasurement::Attributes::MeasuredValue::Id); - } - case 1: { - LogStep(1, "Read attribute: MinMeasuredValue"); - return WaitAttribute(GetEndpoint(0), FlowMeasurement::Id, FlowMeasurement::Attributes::MinMeasuredValue::Id); - } - case 2: { - LogStep(2, "Read attribute: MaxMeasuredValue"); - return WaitAttribute(GetEndpoint(0), FlowMeasurement::Id, FlowMeasurement::Attributes::MaxMeasuredValue::Id); - } - case 3: { - LogStep(3, "Read attribute: Tolerance"); - return WaitAttribute(GetEndpoint(0), FlowMeasurement::Id, FlowMeasurement::Attributes::Tolerance::Id); - } - case 4: { - LogStep(4, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList. Commission " - "DUT to TH again."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 6: { - LogStep(6, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_G_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_G_3_1_SimulatedSuite() : TestCommand("Test_TC_G_3_1_Simulated", 1) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_G_3_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - 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) - { - case 0: { - LogStep(0, "DUT reads NameSupport attribute value from TH"); - VerifyOrDo(!ShouldSkip("G.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), Groups::Id, Groups::Attributes::NameSupport::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_I_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_I_3_1_SimulatedSuite() : TestCommand("Test_TC_I_3_1_Simulated", 7) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_I_3_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Read attribute: IdentifyTime"); - return WaitAttribute(GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyTime::Id); - } - case 1: { - LogStep(1, "write attribute: IdentifyTime"); - return WaitAttribute(GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyTime::Id); - } - case 2: { - LogStep(2, "Readback attribute: IdentifyTime"); - return WaitAttribute(GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyTime::Id); - } - case 3: { - LogStep(3, "Read attribute: identifytype"); - return WaitAttribute(GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyType::Id); - } - case 4: { - LogStep(4, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 6: { - LogStep(6, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_PRS_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_PRS_3_1_SimulatedSuite() : TestCommand("Test_TC_PRS_3_1_Simulated", 12) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_PRS_3_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - 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, "Read attribute: MeasuredValue"); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::MeasuredValue::Id); - } - case 1: { - LogStep(1, "Read attribute: MinMeasuredValue"); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::MinMeasuredValue::Id); - } - case 2: { - LogStep(2, "Read attribute: MaxMeasuredValue"); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::MaxMeasuredValue::Id); - } - case 3: { - LogStep(3, "Read attribute: Tolerance"); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::Tolerance::Id); - } - case 4: { - LogStep(4, "Read attribute: ScaledValue"); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::ScaledValue::Id); - } - case 5: { - LogStep(5, "Read attribute: MinScaledValue"); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::MinScaledValue::Id); - } - case 6: { - LogStep(6, "Read attribute: MaxScaledValue"); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::MaxScaledValue::Id); - } - case 7: { - LogStep(7, "Read attribute: ScaledTolerance"); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::ScaledTolerance::Id); - } - case 8: { - LogStep(8, "Read attribute: Scale"); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::Scale::Id); - } - case 9: { - LogStep(9, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 10: { - LogStep(10, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + case 1: { + LogStep(1, "Read attribute: CurrentHeapFree"); + VerifyOrDo(!ShouldSkip("DGSW.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Attributes::CurrentHeapFree::Id); } - case 11: { - LogStep(11, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + case 2: { + LogStep(2, "Read attribute: CurrentHeapUsed"); + VerifyOrDo(!ShouldSkip("DGSW.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Attributes::CurrentHeapUsed::Id); + } + case 3: { + LogStep(3, "Read attribute: CurrentHeapHighWatermark"); + VerifyOrDo(!ShouldSkip("DGSW.C.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), SoftwareDiagnostics::Id, + SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_PS_3_1_SimulatedSuite : public TestCommand +class Test_TC_DGWIFI_3_1_SimulatedSuite : public TestCommand { public: - Test_TC_PS_3_1_SimulatedSuite() : TestCommand("Test_TC_PS_3_1_Simulated", 31) + Test_TC_DGWIFI_3_1_SimulatedSuite() : TestCommand("Test_TC_DGWIFI_3_1_Simulated", 13) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -1196,7 +444,7 @@ class Test_TC_PS_3_1_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_PS_3_1_SimulatedSuite() {} + ~Test_TC_DGWIFI_3_1_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -1232,138 +480,85 @@ class Test_TC_PS_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute: Status"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::Status::Id); + LogStep(0, "Read attribute: BSSID"); + VerifyOrDo(!ShouldSkip("DGWIFI.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::Bssid::Id); } case 1: { - LogStep(1, "Read attribute: Order"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::Order::Id); + LogStep(1, "Read attribute: SecurityType"); + VerifyOrDo(!ShouldSkip("DGWIFI.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::SecurityType::Id); } case 2: { - LogStep(2, "Read attribute: Description"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::Description::Id); + LogStep(2, "Read attribute: WiFiVersion"); + VerifyOrDo(!ShouldSkip("DGWIFI.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::WiFiVersion::Id); } case 3: { - LogStep(3, "Read attribute: WiredAssessedInputVoltage"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::WiredAssessedInputVoltage::Id); + LogStep(3, "Read attribute: ChannelNumber"); + VerifyOrDo(!ShouldSkip("DGWIFI.C.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::ChannelNumber::Id); } case 4: { - LogStep(4, "Read attribute: WiredAssessedInputFrequency"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::WiredAssessedInputFrequency::Id); + LogStep(4, "Read attribute: RSSI"); + VerifyOrDo(!ShouldSkip("DGWIFI.C.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::Rssi::Id); } case 5: { - LogStep(5, "Read attribute: WiredCurrentType"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::WiredCurrentType::Id); + LogStep(5, "Read attribute: BeaconLostCount"); + VerifyOrDo(!ShouldSkip("DGWIFI.C.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, + WiFiNetworkDiagnostics::Attributes::BeaconLostCount::Id); } case 6: { - LogStep(6, "Read attribute: WiredAssessedCurrent"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::WiredAssessedCurrent::Id); + LogStep(6, "Read attribute: BeaconRxCount"); + VerifyOrDo(!ShouldSkip("DGWIFI.C.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::BeaconRxCount::Id); } case 7: { - LogStep(7, "Read attribute: WiredNominalVoltage"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::WiredNominalVoltage::Id); + LogStep(7, "Read attribute: PacketMulticastRxCount"); + VerifyOrDo(!ShouldSkip("DGWIFI.C.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, + WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::Id); } case 8: { - LogStep(8, "Read attribute: WiredPresent"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::WiredPresent::Id); + LogStep(8, "Read attribute: PacketMulticastTxCount"); + VerifyOrDo(!ShouldSkip("DGWIFI.C.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, + WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::Id); } case 9: { - LogStep(9, "Read attribute: WiredMaximumCurrent"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::WiredMaximumCurrent::Id); + LogStep(9, "Read attribute: PacketUnicastRxCount"); + VerifyOrDo(!ShouldSkip("DGWIFI.C.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, + WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::Id); } case 10: { - LogStep(10, "Read attribute: ActiveWiredFaults"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::ActiveWiredFaults::Id); + LogStep(10, "Read attribute: PacketUnicastTxCount"); + VerifyOrDo(!ShouldSkip("DGWIFI.C.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, + WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::Id); } case 11: { - LogStep(11, "Read attribute: BatVoltage"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::BatVoltage::Id); + LogStep(11, "Read attribute: CurrentMaxRate"); + VerifyOrDo(!ShouldSkip("DGWIFI.C.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, + WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::Id); } case 12: { - LogStep(12, "Read attribute: BatPercentRemaining"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::BatPercentRemaining::Id); - } - case 13: { - LogStep(13, "Read attribute: BatTimeRemaining"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::BatTimeRemaining::Id); - } - case 14: { - LogStep(14, "Read attribute: BatChargeLevel"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::BatChargeLevel::Id); - } - case 15: { - LogStep(15, "Read attribute: BatReplacementNeeded"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::BatReplacementNeeded::Id); - } - case 16: { - LogStep(16, "Read attribute: BatReplaceability"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::BatReplaceability::Id); - } - case 17: { - LogStep(17, "Read attribute: BatPresent"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::BatPresent::Id); - } - case 18: { - LogStep(18, "Read attribute: ActiveBatFaults"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::ActiveBatFaults::Id); - } - case 19: { - LogStep(19, "Read attribute: BatReplacementDescription"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::BatReplacementDescription::Id); - } - case 20: { - LogStep(20, "Read attribute: BatCommonDesignation"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::BatCommonDesignation::Id); - } - case 21: { - LogStep(21, "Read attribute: BatANSIDesignation"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::BatANSIDesignation::Id); - } - case 22: { - LogStep(22, "Read attribute: BatIECDesignation"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::BatIECDesignation::Id); - } - case 23: { - LogStep(23, "Read attribute: BatApprovedChemistry"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::BatApprovedChemistry::Id); - } - case 24: { - LogStep(24, "Read attribute: BatCapacity"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::BatCapacity::Id); - } - case 25: { - LogStep(25, "Read attribute: BatQuantity"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::BatQuantity::Id); - } - case 26: { - LogStep(26, "Read attribute: BatChargeState"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::BatChargeState::Id); - } - case 27: { - LogStep(27, "Read attribute: BatTimeToFullCharge"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::BatTimeToFullCharge::Id); - } - case 28: { - LogStep(28, "Read attribute: BatFunctionalWhileCharging"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::BatFunctionalWhileCharging::Id); - } - case 29: { - LogStep(29, "Read attribute: BatChargingCurrent"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::BatChargingCurrent::Id); - } - case 30: { - LogStep(30, "Read attribute: ActiveBatChargeFaults"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::ActiveBatChargeFaults::Id); + LogStep(12, "Read attribute: OverrunCount"); + VerifyOrDo(!ShouldSkip("DGWIFI.C.A000c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::OverrunCount::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_PSCFG_3_1_SimulatedSuite : public TestCommand +class Test_TC_G_3_1_SimulatedSuite : public TestCommand { public: - Test_TC_PSCFG_3_1_SimulatedSuite() : TestCommand("Test_TC_PSCFG_3_1_Simulated", 4) + Test_TC_G_3_1_SimulatedSuite() : TestCommand("Test_TC_G_3_1_Simulated", 1) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -1371,7 +566,7 @@ class Test_TC_PSCFG_3_1_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_PSCFG_3_1_SimulatedSuite() {} + ~Test_TC_G_3_1_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -1391,18 +586,6 @@ class Test_TC_PSCFG_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -1419,43 +602,9 @@ class Test_TC_PSCFG_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute: Sources"); - return WaitAttribute(GetEndpoint(0), PowerSourceConfiguration::Id, PowerSourceConfiguration::Attributes::Sources::Id); - } - case 1: { - LogStep(1, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList. Commission " - "DUT to TH again."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 3: { - LogStep(3, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(0, "DUT reads NameSupport attribute value from TH"); + VerifyOrDo(!ShouldSkip("G.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), Groups::Id, Groups::Attributes::NameSupport::Id); } } return CHIP_NO_ERROR; @@ -1580,116 +729,6 @@ class Test_TC_RH_3_1_SimulatedSuite : public TestCommand } }; -class Test_TC_SWTCH_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_SWTCH_3_1_SimulatedSuite() : TestCommand("Test_TC_SWTCH_3_1_Simulated", 6) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SWTCH_3_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - 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, "Read NumberOfPositions attribute"); - return WaitAttribute(GetEndpoint(0), Switch::Id, Switch::Attributes::NumberOfPositions::Id); - } - case 1: { - LogStep(1, "Read CurrentPosition attribute"); - return WaitAttribute(GetEndpoint(0), Switch::Id, Switch::Attributes::CurrentPosition::Id); - } - case 2: { - LogStep(2, "Read MultiPressMax attribute"); - return WaitAttribute(GetEndpoint(0), Switch::Id, Switch::Attributes::MultiPressMax::Id); - } - case 3: { - LogStep(3, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList. Commission " - "DUT to TH again."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - class Test_TC_WNCV_5_1_SimulatedSuite : public TestCommand { public: @@ -2139,12 +1178,12 @@ class Test_TC_OCC_2_4_SimulatedSuite : public TestCommand { case 0: { LogStep(0, "TH reads OccupancySensorType attribute from DUT"); - VerifyOrDo(!ShouldSkip("OCC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("OCC.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorType::Id); } case 1: { LogStep(1, "TH reads OccupancySensorTypeBitmap attribute from DUT"); - VerifyOrDo(!ShouldSkip("OCC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("OCC.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id); } } @@ -2354,14 +1393,6 @@ std::unique_ptr GetTestCommand(std::string testName) { return std::unique_ptr(new Test_TC_BINFO_2_3_SimulatedSuite()); } - if (testName == "Test_TC_ACT_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_ACT_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_BOOL_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_BOOL_3_1_SimulatedSuite()); - } if (testName == "Test_TC_DESC_2_2_Simulated") { return std::unique_ptr(new Test_TC_DESC_2_2_SimulatedSuite()); @@ -2378,38 +1409,14 @@ std::unique_ptr GetTestCommand(std::string testName) { return std::unique_ptr(new Test_TC_DGWIFI_3_1_SimulatedSuite()); } - if (testName == "Test_TC_FLW_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_FLW_3_1_SimulatedSuite()); - } if (testName == "Test_TC_G_3_1_Simulated") { return std::unique_ptr(new Test_TC_G_3_1_SimulatedSuite()); } - if (testName == "Test_TC_I_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_I_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_PRS_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_PRS_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_PS_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_PS_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_PSCFG_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_PSCFG_3_1_SimulatedSuite()); - } if (testName == "Test_TC_RH_3_1_Simulated") { return std::unique_ptr(new Test_TC_RH_3_1_SimulatedSuite()); } - if (testName == "Test_TC_SWTCH_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_SWTCH_3_1_SimulatedSuite()); - } if (testName == "Test_TC_WNCV_5_1_Simulated") { return std::unique_ptr(new Test_TC_WNCV_5_1_SimulatedSuite()); @@ -2454,20 +1461,12 @@ void PrintTestCommands() { ChipLogError(chipTool, "Supported commands:"); ChipLogError(chipTool, "\t* Test_TC_BINFO_2_3_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_ACT_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_BOOL_3_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_DESC_2_2_Simulated"); ChipLogError(chipTool, "\t* Test_TC_DGETH_3_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_DGSW_3_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_DGWIFI_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_FLW_3_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_G_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_I_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_PRS_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_PS_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_PSCFG_3_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_RH_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_SWTCH_3_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_WNCV_5_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_LCFG_3_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_LUNIT_1_1_Simulated"); diff --git a/zzz_generated/placeholder/app2/zap-generated/test/Commands.h b/zzz_generated/placeholder/app2/zap-generated/test/Commands.h index 4e02f06118f737..ae60cba97fc3b1 100644 --- a/zzz_generated/placeholder/app2/zap-generated/test/Commands.h +++ b/zzz_generated/placeholder/app2/zap-generated/test/Commands.h @@ -185,218 +185,6 @@ class Test_TC_BINFO_2_3_SimulatedSuite : public TestCommand } }; -class Test_TC_ACT_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_ACT_3_1_SimulatedSuite() : TestCommand("Test_TC_ACT_3_1_Simulated", 6) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_ACT_3_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - 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, "Read attribute: ActionList"); - return WaitAttribute(GetEndpoint(0), Actions::Id, Actions::Attributes::ActionList::Id); - } - case 1: { - LogStep(1, "Read attribute: EndpointLists"); - return WaitAttribute(GetEndpoint(0), Actions::Id, Actions::Attributes::EndpointLists::Id); - } - case 2: { - LogStep(2, "Read attribute: SetupURL"); - return WaitAttribute(GetEndpoint(0), Actions::Id, Actions::Attributes::SetupURL::Id); - } - case 3: { - LogStep(3, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BOOL_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_BOOL_3_1_SimulatedSuite() : TestCommand("Test_TC_BOOL_3_1_Simulated", 4) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BOOL_3_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - 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, "Read attribute: StateValue"); - return WaitAttribute(GetEndpoint(0), BooleanState::Id, BooleanState::Attributes::StateValue::Id); - } - case 1: { - LogStep(1, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 3: { - LogStep(3, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - class Test_TC_DESC_2_2_SimulatedSuite : public TestCommand { public: @@ -624,571 +412,31 @@ class Test_TC_DGSW_3_1_SimulatedSuite : public TestCommand VerifyOrDo(!ShouldSkip("DGSW.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return WaitAttribute(GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Attributes::ThreadMetrics::Id); } - case 1: { - LogStep(1, "Read attribute: CurrentHeapFree"); - VerifyOrDo(!ShouldSkip("DGSW.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Attributes::CurrentHeapFree::Id); - } - case 2: { - LogStep(2, "Read attribute: CurrentHeapUsed"); - VerifyOrDo(!ShouldSkip("DGSW.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Attributes::CurrentHeapUsed::Id); - } - case 3: { - LogStep(3, "Read attribute: CurrentHeapHighWatermark"); - VerifyOrDo(!ShouldSkip("DGSW.C.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), SoftwareDiagnostics::Id, - SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_DGWIFI_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_DGWIFI_3_1_SimulatedSuite() : TestCommand("Test_TC_DGWIFI_3_1_Simulated", 13) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_DGWIFI_3_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - 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) - { - case 0: { - LogStep(0, "Read attribute: BSSID"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::Bssid::Id); - } - case 1: { - LogStep(1, "Read attribute: SecurityType"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::SecurityType::Id); - } - case 2: { - LogStep(2, "Read attribute: WiFiVersion"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::WiFiVersion::Id); - } - case 3: { - LogStep(3, "Read attribute: ChannelNumber"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::ChannelNumber::Id); - } - case 4: { - LogStep(4, "Read attribute: RSSI"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::Rssi::Id); - } - case 5: { - LogStep(5, "Read attribute: BeaconLostCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::BeaconLostCount::Id); - } - case 6: { - LogStep(6, "Read attribute: BeaconRxCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::BeaconRxCount::Id); - } - case 7: { - LogStep(7, "Read attribute: PacketMulticastRxCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::Id); - } - case 8: { - LogStep(8, "Read attribute: PacketMulticastTxCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::Id); - } - case 9: { - LogStep(9, "Read attribute: PacketUnicastRxCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::Id); - } - case 10: { - LogStep(10, "Read attribute: PacketUnicastTxCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::Id); - } - case 11: { - LogStep(11, "Read attribute: CurrentMaxRate"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, - WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::Id); - } - case 12: { - LogStep(12, "Read attribute: OverrunCount"); - VerifyOrDo(!ShouldSkip("DGWIFI.C.A000c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::OverrunCount::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_FLW_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_FLW_3_1_SimulatedSuite() : TestCommand("Test_TC_FLW_3_1_Simulated", 7) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_FLW_3_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Read attribute: MeasuredValue"); - return WaitAttribute(GetEndpoint(0), FlowMeasurement::Id, FlowMeasurement::Attributes::MeasuredValue::Id); - } - case 1: { - LogStep(1, "Read attribute: MinMeasuredValue"); - return WaitAttribute(GetEndpoint(0), FlowMeasurement::Id, FlowMeasurement::Attributes::MinMeasuredValue::Id); - } - case 2: { - LogStep(2, "Read attribute: MaxMeasuredValue"); - return WaitAttribute(GetEndpoint(0), FlowMeasurement::Id, FlowMeasurement::Attributes::MaxMeasuredValue::Id); - } - case 3: { - LogStep(3, "Read attribute: Tolerance"); - return WaitAttribute(GetEndpoint(0), FlowMeasurement::Id, FlowMeasurement::Attributes::Tolerance::Id); - } - case 4: { - LogStep(4, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList. Commission " - "DUT to TH again."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 6: { - LogStep(6, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_G_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_G_3_1_SimulatedSuite() : TestCommand("Test_TC_G_3_1_Simulated", 1) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_G_3_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - 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) - { - case 0: { - LogStep(0, "DUT reads NameSupport attribute value from TH"); - VerifyOrDo(!ShouldSkip("G.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return WaitAttribute(GetEndpoint(1), Groups::Id, Groups::Attributes::NameSupport::Id); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_I_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_I_3_1_SimulatedSuite() : TestCommand("Test_TC_I_3_1_Simulated", 7) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_I_3_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 6: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - switch (testIndex) - { - case 0: { - LogStep(0, "Read attribute: IdentifyTime"); - return WaitAttribute(GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyTime::Id); - } - case 1: { - LogStep(1, "write attribute: IdentifyTime"); - return WaitAttribute(GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyTime::Id); - } - case 2: { - LogStep(2, "Readback attribute: IdentifyTime"); - return WaitAttribute(GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyTime::Id); - } - case 3: { - LogStep(3, "Read attribute: identifytype"); - return WaitAttribute(GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyType::Id); - } - case 4: { - LogStep(4, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 6: { - LogStep(6, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_PRS_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_PRS_3_1_SimulatedSuite() : TestCommand("Test_TC_PRS_3_1_Simulated", 12) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_PRS_3_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 9: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 10: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 11: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - 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, "Read attribute: MeasuredValue"); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::MeasuredValue::Id); - } - case 1: { - LogStep(1, "Read attribute: MinMeasuredValue"); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::MinMeasuredValue::Id); - } - case 2: { - LogStep(2, "Read attribute: MaxMeasuredValue"); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::MaxMeasuredValue::Id); - } - case 3: { - LogStep(3, "Read attribute: Tolerance"); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::Tolerance::Id); - } - case 4: { - LogStep(4, "Read attribute: ScaledValue"); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::ScaledValue::Id); - } - case 5: { - LogStep(5, "Read attribute: MinScaledValue"); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::MinScaledValue::Id); - } - case 6: { - LogStep(6, "Read attribute: MaxScaledValue"); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::MaxScaledValue::Id); - } - case 7: { - LogStep(7, "Read attribute: ScaledTolerance"); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::ScaledTolerance::Id); - } - case 8: { - LogStep(8, "Read attribute: Scale"); - return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::Scale::Id); - } - case 9: { - LogStep(9, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList.Commission " - "DUT to TH again."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 10: { - LogStep(10, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + case 1: { + LogStep(1, "Read attribute: CurrentHeapFree"); + VerifyOrDo(!ShouldSkip("DGSW.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Attributes::CurrentHeapFree::Id); } - case 11: { - LogStep(11, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + case 2: { + LogStep(2, "Read attribute: CurrentHeapUsed"); + VerifyOrDo(!ShouldSkip("DGSW.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Attributes::CurrentHeapUsed::Id); + } + case 3: { + LogStep(3, "Read attribute: CurrentHeapHighWatermark"); + VerifyOrDo(!ShouldSkip("DGSW.C.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), SoftwareDiagnostics::Id, + SoftwareDiagnostics::Attributes::CurrentHeapHighWatermark::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_PS_3_1_SimulatedSuite : public TestCommand +class Test_TC_DGWIFI_3_1_SimulatedSuite : public TestCommand { public: - Test_TC_PS_3_1_SimulatedSuite() : TestCommand("Test_TC_PS_3_1_Simulated", 31) + Test_TC_DGWIFI_3_1_SimulatedSuite() : TestCommand("Test_TC_DGWIFI_3_1_Simulated", 13) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -1196,7 +444,7 @@ class Test_TC_PS_3_1_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_PS_3_1_SimulatedSuite() {} + ~Test_TC_DGWIFI_3_1_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -1232,138 +480,85 @@ class Test_TC_PS_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute: Status"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::Status::Id); + LogStep(0, "Read attribute: BSSID"); + VerifyOrDo(!ShouldSkip("DGWIFI.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::Bssid::Id); } case 1: { - LogStep(1, "Read attribute: Order"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::Order::Id); + LogStep(1, "Read attribute: SecurityType"); + VerifyOrDo(!ShouldSkip("DGWIFI.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::SecurityType::Id); } case 2: { - LogStep(2, "Read attribute: Description"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::Description::Id); + LogStep(2, "Read attribute: WiFiVersion"); + VerifyOrDo(!ShouldSkip("DGWIFI.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::WiFiVersion::Id); } case 3: { - LogStep(3, "Read attribute: WiredAssessedInputVoltage"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::WiredAssessedInputVoltage::Id); + LogStep(3, "Read attribute: ChannelNumber"); + VerifyOrDo(!ShouldSkip("DGWIFI.C.A0003"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::ChannelNumber::Id); } case 4: { - LogStep(4, "Read attribute: WiredAssessedInputFrequency"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::WiredAssessedInputFrequency::Id); + LogStep(4, "Read attribute: RSSI"); + VerifyOrDo(!ShouldSkip("DGWIFI.C.A0004"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::Rssi::Id); } case 5: { - LogStep(5, "Read attribute: WiredCurrentType"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::WiredCurrentType::Id); + LogStep(5, "Read attribute: BeaconLostCount"); + VerifyOrDo(!ShouldSkip("DGWIFI.C.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, + WiFiNetworkDiagnostics::Attributes::BeaconLostCount::Id); } case 6: { - LogStep(6, "Read attribute: WiredAssessedCurrent"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::WiredAssessedCurrent::Id); + LogStep(6, "Read attribute: BeaconRxCount"); + VerifyOrDo(!ShouldSkip("DGWIFI.C.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::BeaconRxCount::Id); } case 7: { - LogStep(7, "Read attribute: WiredNominalVoltage"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::WiredNominalVoltage::Id); + LogStep(7, "Read attribute: PacketMulticastRxCount"); + VerifyOrDo(!ShouldSkip("DGWIFI.C.A0007"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, + WiFiNetworkDiagnostics::Attributes::PacketMulticastRxCount::Id); } case 8: { - LogStep(8, "Read attribute: WiredPresent"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::WiredPresent::Id); + LogStep(8, "Read attribute: PacketMulticastTxCount"); + VerifyOrDo(!ShouldSkip("DGWIFI.C.A0008"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, + WiFiNetworkDiagnostics::Attributes::PacketMulticastTxCount::Id); } case 9: { - LogStep(9, "Read attribute: WiredMaximumCurrent"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::WiredMaximumCurrent::Id); + LogStep(9, "Read attribute: PacketUnicastRxCount"); + VerifyOrDo(!ShouldSkip("DGWIFI.C.A0009"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, + WiFiNetworkDiagnostics::Attributes::PacketUnicastRxCount::Id); } case 10: { - LogStep(10, "Read attribute: ActiveWiredFaults"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::ActiveWiredFaults::Id); + LogStep(10, "Read attribute: PacketUnicastTxCount"); + VerifyOrDo(!ShouldSkip("DGWIFI.C.A000a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, + WiFiNetworkDiagnostics::Attributes::PacketUnicastTxCount::Id); } case 11: { - LogStep(11, "Read attribute: BatVoltage"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::BatVoltage::Id); + LogStep(11, "Read attribute: CurrentMaxRate"); + VerifyOrDo(!ShouldSkip("DGWIFI.C.A000b"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, + WiFiNetworkDiagnostics::Attributes::CurrentMaxRate::Id); } case 12: { - LogStep(12, "Read attribute: BatPercentRemaining"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::BatPercentRemaining::Id); - } - case 13: { - LogStep(13, "Read attribute: BatTimeRemaining"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::BatTimeRemaining::Id); - } - case 14: { - LogStep(14, "Read attribute: BatChargeLevel"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::BatChargeLevel::Id); - } - case 15: { - LogStep(15, "Read attribute: BatReplacementNeeded"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::BatReplacementNeeded::Id); - } - case 16: { - LogStep(16, "Read attribute: BatReplaceability"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::BatReplaceability::Id); - } - case 17: { - LogStep(17, "Read attribute: BatPresent"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::BatPresent::Id); - } - case 18: { - LogStep(18, "Read attribute: ActiveBatFaults"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::ActiveBatFaults::Id); - } - case 19: { - LogStep(19, "Read attribute: BatReplacementDescription"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::BatReplacementDescription::Id); - } - case 20: { - LogStep(20, "Read attribute: BatCommonDesignation"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::BatCommonDesignation::Id); - } - case 21: { - LogStep(21, "Read attribute: BatANSIDesignation"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::BatANSIDesignation::Id); - } - case 22: { - LogStep(22, "Read attribute: BatIECDesignation"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::BatIECDesignation::Id); - } - case 23: { - LogStep(23, "Read attribute: BatApprovedChemistry"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::BatApprovedChemistry::Id); - } - case 24: { - LogStep(24, "Read attribute: BatCapacity"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::BatCapacity::Id); - } - case 25: { - LogStep(25, "Read attribute: BatQuantity"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::BatQuantity::Id); - } - case 26: { - LogStep(26, "Read attribute: BatChargeState"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::BatChargeState::Id); - } - case 27: { - LogStep(27, "Read attribute: BatTimeToFullCharge"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::BatTimeToFullCharge::Id); - } - case 28: { - LogStep(28, "Read attribute: BatFunctionalWhileCharging"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::BatFunctionalWhileCharging::Id); - } - case 29: { - LogStep(29, "Read attribute: BatChargingCurrent"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::BatChargingCurrent::Id); - } - case 30: { - LogStep(30, "Read attribute: ActiveBatChargeFaults"); - return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::ActiveBatChargeFaults::Id); + LogStep(12, "Read attribute: OverrunCount"); + VerifyOrDo(!ShouldSkip("DGWIFI.C.A000c"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), WiFiNetworkDiagnostics::Id, WiFiNetworkDiagnostics::Attributes::OverrunCount::Id); } } return CHIP_NO_ERROR; } }; -class Test_TC_PSCFG_3_1_SimulatedSuite : public TestCommand +class Test_TC_G_3_1_SimulatedSuite : public TestCommand { public: - Test_TC_PSCFG_3_1_SimulatedSuite() : TestCommand("Test_TC_PSCFG_3_1_Simulated", 4) + Test_TC_G_3_1_SimulatedSuite() : TestCommand("Test_TC_G_3_1_Simulated", 1) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -1371,7 +566,7 @@ class Test_TC_PSCFG_3_1_SimulatedSuite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_PSCFG_3_1_SimulatedSuite() {} + ~Test_TC_G_3_1_SimulatedSuite() {} private: chip::Optional mNodeId; @@ -1391,18 +586,6 @@ class Test_TC_PSCFG_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -1419,43 +602,9 @@ class Test_TC_PSCFG_3_1_SimulatedSuite : public TestCommand switch (testIndex) { case 0: { - LogStep(0, "Read attribute: Sources"); - return WaitAttribute(GetEndpoint(0), PowerSourceConfiguration::Id, PowerSourceConfiguration::Attributes::Sources::Id); - } - case 1: { - LogStep(1, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList. Commission " - "DUT to TH again."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 2: { - LogStep(2, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 3: { - LogStep(3, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + LogStep(0, "DUT reads NameSupport attribute value from TH"); + VerifyOrDo(!ShouldSkip("G.C.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(1), Groups::Id, Groups::Attributes::NameSupport::Id); } } return CHIP_NO_ERROR; @@ -1580,116 +729,6 @@ class Test_TC_RH_3_1_SimulatedSuite : public TestCommand } }; -class Test_TC_SWTCH_3_1_SimulatedSuite : public TestCommand -{ -public: - Test_TC_SWTCH_3_1_SimulatedSuite() : TestCommand("Test_TC_SWTCH_3_1_Simulated", 6) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_SWTCH_3_1_SimulatedSuite() {} - -private: - chip::Optional mNodeId; - chip::Optional mCluster; - chip::Optional mEndpoint; - chip::Optional mTimeout; - - chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } - - // - // Tests methods - // - - void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override - { - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - 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, "Read NumberOfPositions attribute"); - return WaitAttribute(GetEndpoint(0), Switch::Id, Switch::Attributes::NumberOfPositions::Id); - } - case 1: { - LogStep(1, "Read CurrentPosition attribute"); - return WaitAttribute(GetEndpoint(0), Switch::Id, Switch::Attributes::CurrentPosition::Id); - } - case 2: { - LogStep(2, "Read MultiPressMax attribute"); - return WaitAttribute(GetEndpoint(0), Switch::Id, Switch::Attributes::MultiPressMax::Id); - } - case 3: { - LogStep(3, - "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " - "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList. Commission " - "DUT to TH again."); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 4: { - LogStep(4, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, - "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " - "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - } - return CHIP_NO_ERROR; - } -}; - class Test_TC_WNCV_5_1_SimulatedSuite : public TestCommand { public: @@ -2139,12 +1178,12 @@ class Test_TC_OCC_2_4_SimulatedSuite : public TestCommand { case 0: { LogStep(0, "TH reads OccupancySensorType attribute from DUT"); - VerifyOrDo(!ShouldSkip("OCC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("OCC.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorType::Id); } case 1: { LogStep(1, "TH reads OccupancySensorTypeBitmap attribute from DUT"); - VerifyOrDo(!ShouldSkip("OCC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("OCC.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id); } } @@ -2354,14 +1393,6 @@ std::unique_ptr GetTestCommand(std::string testName) { return std::unique_ptr(new Test_TC_BINFO_2_3_SimulatedSuite()); } - if (testName == "Test_TC_ACT_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_ACT_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_BOOL_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_BOOL_3_1_SimulatedSuite()); - } if (testName == "Test_TC_DESC_2_2_Simulated") { return std::unique_ptr(new Test_TC_DESC_2_2_SimulatedSuite()); @@ -2378,38 +1409,14 @@ std::unique_ptr GetTestCommand(std::string testName) { return std::unique_ptr(new Test_TC_DGWIFI_3_1_SimulatedSuite()); } - if (testName == "Test_TC_FLW_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_FLW_3_1_SimulatedSuite()); - } if (testName == "Test_TC_G_3_1_Simulated") { return std::unique_ptr(new Test_TC_G_3_1_SimulatedSuite()); } - if (testName == "Test_TC_I_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_I_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_PRS_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_PRS_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_PS_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_PS_3_1_SimulatedSuite()); - } - if (testName == "Test_TC_PSCFG_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_PSCFG_3_1_SimulatedSuite()); - } if (testName == "Test_TC_RH_3_1_Simulated") { return std::unique_ptr(new Test_TC_RH_3_1_SimulatedSuite()); } - if (testName == "Test_TC_SWTCH_3_1_Simulated") - { - return std::unique_ptr(new Test_TC_SWTCH_3_1_SimulatedSuite()); - } if (testName == "Test_TC_WNCV_5_1_Simulated") { return std::unique_ptr(new Test_TC_WNCV_5_1_SimulatedSuite()); @@ -2454,20 +1461,12 @@ void PrintTestCommands() { ChipLogError(chipTool, "Supported commands:"); ChipLogError(chipTool, "\t* Test_TC_BINFO_2_3_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_ACT_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_BOOL_3_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_DESC_2_2_Simulated"); ChipLogError(chipTool, "\t* Test_TC_DGETH_3_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_DGSW_3_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_DGWIFI_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_FLW_3_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_G_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_I_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_PRS_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_PS_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_PSCFG_3_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_RH_3_1_Simulated"); - ChipLogError(chipTool, "\t* Test_TC_SWTCH_3_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_WNCV_5_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_LCFG_3_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_LUNIT_1_1_Simulated");