From 2ce5f2d6e88a69e24ca8542cd03c233292755423 Mon Sep 17 00:00:00 2001 From: manjunath-grl <102359958+manjunath-grl@users.noreply.github.com> Date: Thu, 26 Jan 2023 05:26:43 +0530 Subject: [PATCH] Added test jan 25 (#24639) * Added tests: TC-ACL-2.10 Simulated test: TC-LTIME-1.1 * Auto generated files * Modifed test TC-ACL-2.10 * Updated the Copyright year in script LTIME-1.1 * Removed Manual script comment in Script LTIME-1.1 --- .../templates/tests/ciTests.json | 3 +- .../placeholder/linux/apps/app1/ciTests.json | 3 +- .../placeholder/linux/apps/app1/config.matter | 36 + .../placeholder/linux/apps/app1/config.zap | 116 ++ .../placeholder/linux/apps/app2/config.matter | 36 + .../placeholder/linux/apps/app2/config.zap | 116 ++ .../certification/Test_TC_ACL_2_10.yaml | 751 ++++----- .../certification/Test_TC_LTIME_1_1.yaml | 337 ---- .../Test_TC_LTIME_1_1_Simulated.yaml | 59 + src/app/tests/suites/ciTests.json | 3 +- src/app/tests/suites/manualTests.json | 8 +- .../chip-tool/zap-generated/test/Commands.h | 1365 +++++++++++------ .../app1/zap-generated/test/Commands.h | 108 ++ .../app2/zap-generated/test/Commands.h | 108 ++ 14 files changed, 1782 insertions(+), 1267 deletions(-) delete mode 100644 src/app/tests/suites/certification/Test_TC_LTIME_1_1.yaml create mode 100644 src/app/tests/suites/certification/Test_TC_LTIME_1_1_Simulated.yaml diff --git a/examples/darwin-framework-tool/templates/tests/ciTests.json b/examples/darwin-framework-tool/templates/tests/ciTests.json index 18819d7ccec204..98bff77d169c2f 100644 --- a/examples/darwin-framework-tool/templates/tests/ciTests.json +++ b/examples/darwin-framework-tool/templates/tests/ciTests.json @@ -28,6 +28,7 @@ "Test_TC_ACL_2_4", "Test_TC_ACL_2_7", "Test_TC_ACL_2_8", - "Test_TC_ACL_2_9" + "Test_TC_ACL_2_9", + "Test_TC_ACL_2_10" ] } diff --git a/examples/placeholder/linux/apps/app1/ciTests.json b/examples/placeholder/linux/apps/app1/ciTests.json index 2cea929d311392..2a505b5fa74961 100644 --- a/examples/placeholder/linux/apps/app1/ciTests.json +++ b/examples/placeholder/linux/apps/app1/ciTests.json @@ -22,7 +22,8 @@ "Test_TC_OCC_2_2_Simulated", "Test_TC_OCC_2_4_Simulated", "Test_TC_ULABEL_3_1_Simulated", - "Test_TC_FLABEL_3_1_Simulated" + "Test_TC_FLABEL_3_1_Simulated", + "Test_TC_LTIME_1_1_Simulated" ], "collection": ["Test"] } diff --git a/examples/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index a450e3060fa3ba..e4607579a70638 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -570,6 +570,34 @@ server cluster LocalizationConfiguration = 43 { readonly attribute int16u clusterRevision = 65533; } +server cluster TimeFormatLocalization = 44 { + enum CalendarType : ENUM8 { + kBuddhist = 0; + kChinese = 1; + kCoptic = 2; + kEthiopian = 3; + kGregorian = 4; + kHebrew = 5; + kIndian = 6; + kIslamic = 7; + kJapanese = 8; + kKorean = 9; + kPersian = 10; + kTaiwanese = 11; + } + + enum HourFormat : ENUM8 { + k12hr = 0; + k24hr = 1; + } + + attribute HourFormat hourFormat = 0; + attribute CalendarType activeCalendarType = 1; + readonly attribute CalendarType supportedCalendarTypes[] = 2; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + client cluster UnitLocalization = 45 { enum TempUnit : ENUM8 { kFahrenheit = 0; @@ -2805,6 +2833,14 @@ endpoint 0 { ram attribute clusterRevision default = 1; } + server cluster TimeFormatLocalization { + callback attribute hourFormat; + callback attribute activeCalendarType; + callback attribute supportedCalendarTypes; + ram attribute featureMap; + ram attribute clusterRevision default = 1; + } + server cluster PowerSourceConfiguration { callback attribute sources; ram attribute featureMap; diff --git a/examples/placeholder/linux/apps/app1/config.zap b/examples/placeholder/linux/apps/app1/config.zap index 97bb36fb1b1997..1a8bab34c8582e 100644 --- a/examples/placeholder/linux/apps/app1/config.zap +++ b/examples/placeholder/linux/apps/app1/config.zap @@ -920,6 +920,122 @@ } ] }, + { + "name": "Time Format Localization", + "code": 44, + "mfgCode": null, + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Time Format Localization", + "code": 44, + "mfgCode": null, + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "HourFormat", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ActiveCalendarType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SupportedCalendarTypes", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, { "name": "Power Source Configuration", "code": 46, diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index 28dd9286eddd09..8bef18bf0df71a 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -563,6 +563,34 @@ server cluster LocalizationConfiguration = 43 { readonly attribute int16u clusterRevision = 65533; } +server cluster TimeFormatLocalization = 44 { + enum CalendarType : ENUM8 { + kBuddhist = 0; + kChinese = 1; + kCoptic = 2; + kEthiopian = 3; + kGregorian = 4; + kHebrew = 5; + kIndian = 6; + kIslamic = 7; + kJapanese = 8; + kKorean = 9; + kPersian = 10; + kTaiwanese = 11; + } + + enum HourFormat : ENUM8 { + k12hr = 0; + k24hr = 1; + } + + attribute HourFormat hourFormat = 0; + attribute CalendarType activeCalendarType = 1; + readonly attribute CalendarType supportedCalendarTypes[] = 2; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + server cluster UnitLocalization = 45 { enum TempUnit : ENUM8 { kFahrenheit = 0; @@ -2789,6 +2817,14 @@ endpoint 0 { ram attribute clusterRevision default = 1; } + server cluster TimeFormatLocalization { + callback attribute hourFormat; + callback attribute activeCalendarType; + callback attribute supportedCalendarTypes; + ram attribute featureMap; + ram attribute clusterRevision default = 1; + } + server cluster UnitLocalization { ram attribute temperatureUnit; ram attribute featureMap; diff --git a/examples/placeholder/linux/apps/app2/config.zap b/examples/placeholder/linux/apps/app2/config.zap index 1410b0308db2d0..1c98dbc98892d6 100644 --- a/examples/placeholder/linux/apps/app2/config.zap +++ b/examples/placeholder/linux/apps/app2/config.zap @@ -920,6 +920,122 @@ } ] }, + { + "name": "Time Format Localization", + "code": 44, + "mfgCode": null, + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "side": "client", + "enabled": 0, + "attributes": [ + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "client", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Time Format Localization", + "code": 44, + "mfgCode": null, + "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "HourFormat", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ActiveCalendarType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "enum8", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SupportedCalendarTypes", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, { "name": "Localization Configuration", "code": 43, 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 1e3993f4f7d72b..b340eaad4a8280 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,523 +13,340 @@ # 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: 131.2.10. [TC-ACL-2.10] Persistence +name: 133.2.3. [TC-ACL-2.10] Extension attribute PICS: - ACL.S config: nodeId: 0x12344321 - cluster: "Basic Information" + cluster: "Access Control" endpoint: 0 + nodeId2: + type: node_id + defaultValue: 0xCAFE + TH1CommissionerNodeId: + type: node_id + defaultValue: 112233 + TH2CommissionerNodeId: + type: node_id + defaultValue: 112233 + discriminator: + type: int16u + defaultValue: 3840 + payload: + type: char_string + defaultValue: "MT:-24J0AFN00KA0648G00" + D_OK_EMPTY: + type: octet_string + defaultValue: "hex:1718" + D_OK_SINGLE: + type: octet_string + defaultValue: "hex:17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018" tests: - - label: "Pre-Conditions" - verification: | - 1.N1 is the node ID of TH1 - - 2.N2 is the node ID of TH2 - - 2.D_OK_EMPTY:"1718" which is an octstr of length 2 containing valid TLV: - - - top-level anonymous list (empty) - 3.D_OK_SINGLE:"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018" which is an octstr of length 50-100 containing valid TLV: - - - top-level anonymous list, containing - one element with profile-specific tag in fully-qualified form - 4.Need to reboot on step 5 - Follow the below procedure for rebooting (Only applicable on raspi) - 1. create a file using touch command , something like touch suraj.txt - 2. chmod 777 suraj.txt - 3. launch the app ./chip-all-clusters-app --wifi --KVS ./suraj.txt - disabled: true - - - label: "TH1 commissions DUT using admin node ID N1" - verification: | - DUT is commissioned on TH1 fabric - disabled: true + - label: "Step 1:Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId - label: - "TH1 reads DUT Endpoint 0 OperationalCredentials cluster - CurrentFabricIndex attribute" - verification: | - ./chip-tool operationalcredentials read current-fabric-index 1 0 - On TH1(Chiptool), verify CurrentFabricIndex attribute of operationalCredential cluster as 1 - [1658329512.220471][3036:3041] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0005 DataVersion: 1369963572 - [1658329512.220529][3036:3041] CHIP:TOO: CurrentFabricIndex: 1 - [1658329512.220601][3036:3041] CHIP:EM: Sending Standalone Ack for MessageCounter:23447431 on exchange 2287i - disabled: true + "Step 2:TH1 reads OperationalCredentials cluster CurrentFabricIndex + attribute" + command: "readAttribute" + cluster: "Operational Credentials" + attribute: "CurrentFabricIndex" + response: + saveAs: TH1FabricIndex - label: - "TH1 puts DUT into commissioning mode, TH2 commissions DUT using admin - node ID N2" - verification: | - Open a commissioning window On TH1(Chiptool)using below command - - ./chip-tool pairing open-commissioning-window 1 1 400 2000 3841 - - [1657186324.710951][10820:10825] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 Status=0x0 - [1657186324.710980][10820:10825] CHIP:CTL: Successfully opened pairing window On TH(Chiptool)e device - [1657186324.711048][10820:10825] CHIP:CTL: Manual pairing code: [36253605617] - [1657186324.711108][10820:10825] CHIP:CTL: SetupQRCode: [MT:-24J0IRV01A7TB7E700] - - - Commission TH2(Chiptool) to DUT using manualcode generated in TH1 using open commission window - - ./chip-tool pairing code 2 36253605617 --commissioner-name beta --commissioner-nodeid 223344 - [1657186359.584672][3509:3514] CHIP:CTL: Successfully finished commissioning step 'Cleanup' - [1657186359.584743][3509:3514] CHIP:TOO: Device commissioning completed with success - disabled: true + "Step 3:TH1 puts DUT into commissioning mode, TH2 commissions DUT + using admin node ID N2" + cluster: "Administrator Commissioning" + command: "OpenBasicCommissioningWindow" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "CommissioningTimeout" + value: 180 + + - label: "TH2 starts a commissioning process with DUT" + identity: "beta" + cluster: "CommissionerCommands" + command: "PairWithCode" + arguments: + values: + - name: "nodeId" + value: nodeId2 + - name: "payload" + value: payload + + - label: "DUT is commissioned by TH2 on Fabric ID2 " + identity: "beta" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId2 - label: - "TH2 reads DUT Endpoint 0 OperationalCredentials cluster - CurrentFabricIndex attribute" - verification: | - ./chip-tool operationalcredentials read current-fabric-index 2 0 --commissioner-nodeid 223344 --commissioner-name beta - On TH2(Chiptool), verify to CurrentFabricIndex attribute of operationalCredential cluster as 2 - - 1658329570.828165][4563:4568] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Attribute 0x0000_0005 DataVersion: 1369963572 - [1658329570.831838][4563:4568] CHIP:TOO: CurrentFabricIndex: 2 - [1658329570.831929][4563:4568] CHIP:EM: Sending Standalone Ack for MessageCounter:4928928 on exchange 29185i - disabled: true + "Step 4:TH2 reads OperationalCredentials cluster CurrentFabricIndex + attribute" + identity: "beta" + command: "readAttribute" + cluster: "Operational Credentials" + attribute: "CurrentFabricIndex" + response: + saveAs: TH2FabricIndex - label: - "TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute, value - is list of AccessControlEntryStruct containing 2 elements 1.struct - Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N1, 1111] Targets field: null 2.struct Privilege field: - Operate (3) AuthMode field: Group (3) Subjects field: [3333] Targets - field: null" + "Step 5:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [112233,1111], "targets": null}, - { "privilege": 3, "authMode": 3, "subjects":[3333] , "targets": null}]" 1 0 - On TH1(Chiptool) , Verify Successfully AccessControl cluster ACL attribute, value is list of AccessControlEntryStruct containing 2 elements - - [1658329787.635523][3056:3061] CHIP:DMG: WriteClient moving to [ResponseRe] - [1658329787.635615][3056:3061] CHIP:DMG: WriteResponseMessage = - [1658329787.635661][3056:3061] CHIP:DMG: { - [1658329787.635701][3056:3061] CHIP:DMG: AttributeStatusIBs = - [1658329787.635758][3056:3061] CHIP:DMG: [ - [1658329787.635804][3056:3061] CHIP:DMG: AttributeStatusIB = - [1658329787.635864][3056:3061] CHIP:DMG: { - [1658329787.635913][3056:3061] CHIP:DMG: AttributePathIB = - [1658329787.635971][3056:3061] CHIP:DMG: { - [1658329787.636030][3056:3061] CHIP:DMG: Endpoint = 0x0, - [1658329787.636093][3056:3061] CHIP:DMG: Cluster = 0x1f, - [1658329787.636157][3056:3061] CHIP:DMG: Attribute = 0x0000_0000, - [1658329787.636216][3056:3061] CHIP:DMG: } - [1658329787.636280][3056:3061] CHIP:DMG: - [1658329787.636334][3056:3061] CHIP:DMG: StatusIB = - [1658329787.636395][3056:3061] CHIP:DMG: { - [1658329787.636452][3056:3061] CHIP:DMG: status = 0x00 (SUCCESS), - [1658329787.636509][3056:3061] CHIP:DMG: }, - [1658329787.636566][3056:3061] CHIP:DMG: - [1658329787.636613][3056:3061] CHIP:DMG: }, - [1658329787.636678][3056:3061] CHIP:DMG: - [1658329787.636723][3056:3061] CHIP:DMG: AttributeStatusIB = - [1658329787.636774][3056:3061] CHIP:DMG: { - [1658329787.636822][3056:3061] CHIP:DMG: AttributePathIB = - [1658329787.636880][3056:3061] CHIP:DMG: { - [1658329787.636937][3056:3061] CHIP:DMG: Endpoint = 0x0, - [1658329787.636998][3056:3061] CHIP:DMG: Cluster = 0x1f, - [1658329787.637066][3056:3061] CHIP:DMG: Attribute = 0x0000_0000, - [1658329787.637131][3056:3061] CHIP:DMG: ListIndex = Null, - [1658329787.637194][3056:3061] CHIP:DMG: } - [1658329787.637263][3056:3061] CHIP:DMG: - [1658329787.637319][3056:3061] CHIP:DMG: StatusIB = - [1658329787.637376][3056:3061] CHIP:DMG: { - [1658329787.637626][3056:3061] CHIP:DMG: status = 0x00 (SUCCESS), - [1658329787.637691][3056:3061] CHIP:DMG: }, - [1658329787.637750][3056:3061] CHIP:DMG: - [1658329787.637801][3056:3061] CHIP:DMG: }, - [1658329787.637868][3056:3061] CHIP:DMG: - [1658329787.637913][3056:3061] CHIP:DMG: AttributeStatusIB = - [1658329787.637966][3056:3061] CHIP:DMG: { - [1658329787.638017][3056:3061] CHIP:DMG: AttributePathIB = - [1658329787.638074][3056:3061] CHIP:DMG: { - [1658329787.638131][3056:3061] CHIP:DMG: Endpoint = 0x0, - [1658329787.638193][3056:3061] CHIP:DMG: Cluster = 0x1f, - [1658329787.638256][3056:3061] CHIP:DMG: Attribute = 0x0000_0000, - [1658329787.638322][3056:3061] CHIP:DMG: ListIndex = Null, - [1658329787.638382][3056:3061] CHIP:DMG: } - [1658329787.638444][3056:3061] CHIP:DMG: - [1658329787.638505][3056:3061] CHIP:DMG: StatusIB = - [1658329787.638562][3056:3061] CHIP:DMG: { - [1658329787.638639][3056:3061] CHIP:DMG: status = 0x00 (SUCCESS), - [1658329787.638698][3056:3061] CHIP:DMG: }, - [1658329787.638754][3056:3061] CHIP:DMG: - [1658329787.638801][3056:3061] CHIP:DMG: }, - [1658329787.638854][3056:3061] CHIP:DMG: - [1658329787.638899][3056:3061] CHIP:DMG: ], - [1658329787.638965][3056:3061] CHIP:DMG: - [1658329787.639009][3056:3061] CHIP:DMG: InteractionModelRevision = 1 - [1658329787.639053][3056:3061] CHIP:DMG: } - [1658329787.639281][3056:3061] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1658329787.639370][3056:3061] CHIP:EM: Sending Standalone Ack for MessageCounter:32017076 on exchange 14424i - disabled: true + command: "writeAttribute" + attribute: "ACL" + arguments: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [TH1CommissionerNodeId, 1111], + Targets: null, + FabricIndex: TH1FabricIndex, + }, + { + Privilege: "3", + AuthMode: "3", + Subjects: [3333], + Targets: null, + FabricIndex: TH1FabricIndex, + }, + ] - label: - "TH2 writes DUT Endpoint 0 AccessControl cluster ACL attribute value - is list of AccessControlEntryStruct containing 2 elements 1.struct - Privilege field: Administer (5) AuthMode field: CASE (2) Subjects - field: [N2, 2222] Targets field: null 2.struct Privilege field: - Operate (3) AuthMode field: Group (3) Subjects field: [4444] Targets - field: null" + "Step 6:TH2 writes DUT Endpoint 0 AccessControl cluster ACL attribute" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol write acl "[{ "privilege": 5, "authMode": 2, "subjects": [223344,2222], "targets": null}, - { "privilege": 3, "authMode": 3, "subjects":[4444] , "targets": null}]" 2 0 --commissioner-nodeid 223344 --commissioner-name beta - - - On TH2(Chiptool), Verify AccessControl cluster ACL attribute value is list of AccessControlEntryStruct containing 2 elements - - - [1658329868.113411][4587:4592] CHIP:DMG: WriteClient moving to [ResponseRe] - [1658329868.113469][4587:4592] CHIP:DMG: WriteResponseMessage = - [1658329868.113496][4587:4592] CHIP:DMG: { - [1658329868.113537][4587:4592] CHIP:DMG: AttributeStatusIBs = - [1658329868.113568][4587:4592] CHIP:DMG: [ - [1658329868.113602][4587:4592] CHIP:DMG: AttributeStatusIB = - [1658329868.113646][4587:4592] CHIP:DMG: { - [1658329868.113672][4587:4592] CHIP:DMG: AttributePathIB = - [1658329868.113712][4587:4592] CHIP:DMG: { - [1658329868.113745][4587:4592] CHIP:DMG: Endpoint = 0x0, - [1658329868.113788][4587:4592] CHIP:DMG: Cluster = 0x1f, - [1658329868.113833][4587:4592] CHIP:DMG: Attribute = 0x0000_0000, - [1658329868.113868][4587:4592] CHIP:DMG: } - [1658329868.113914][4587:4592] CHIP:DMG: - [1658329868.113951][4587:4592] CHIP:DMG: StatusIB = - [1658329868.113984][4587:4592] CHIP:DMG: { - [1658329868.114028][4587:4592] CHIP:DMG: status = 0x00 (SUCCESS), - [1658329868.114091][4587:4592] CHIP:DMG: }, - [1658329868.114124][4587:4592] CHIP:DMG: - [1658329868.114160][4587:4592] CHIP:DMG: }, - [1658329868.114197][4587:4592] CHIP:DMG: - [1658329868.114229][4587:4592] CHIP:DMG: AttributeStatusIB = - [1658329868.114266][4587:4592] CHIP:DMG: { - [1658329868.114294][4587:4592] CHIP:DMG: AttributePathIB = - [1658329868.114335][4587:4592] CHIP:DMG: { - [1658329868.114367][4587:4592] CHIP:DMG: Endpoint = 0x0, - [1658329868.114411][4587:4592] CHIP:DMG: Cluster = 0x1f, - [1658329868.114458][4587:4592] CHIP:DMG: Attribute = 0x0000_0000, - [1658329868.114491][4587:4592] CHIP:DMG: ListIndex = Null, - [1658329868.114529][4587:4592] CHIP:DMG: } - [1658329868.114563][4587:4592] CHIP:DMG: - [1658329868.114604][4587:4592] CHIP:DMG: StatusIB = - [1658329868.114645][4587:4592] CHIP:DMG: { - [1658329868.114677][4587:4592] CHIP:DMG: status = 0x00 (SUCCESS), - [1658329868.114716][4587:4592] CHIP:DMG: }, - [1658329868.114747][4587:4592] CHIP:DMG: - [1658329868.114782][4587:4592] CHIP:DMG: }, - [1658329868.114826][4587:4592] CHIP:DMG: - [1658329868.114850][4587:4592] CHIP:DMG: AttributeStatusIB = - [1658329868.114884][4587:4592] CHIP:DMG: { - [1658329868.114910][4587:4592] CHIP:DMG: AttributePathIB = - [1658329868.114948][4587:4592] CHIP:DMG: { - [1658329868.114980][4587:4592] CHIP:DMG: Endpoint = 0x0, - [1658329868.115024][4587:4592] CHIP:DMG: Cluster = 0x1f, - [1658329868.115067][4587:4592] CHIP:DMG: Attribute = 0x0000_0000, - [1658329868.115102][4587:4592] CHIP:DMG: ListIndex = Null, - [1658329868.115145][4587:4592] CHIP:DMG: } - [1658329868.115188][4587:4592] CHIP:DMG: - [1658329868.115222][4587:4592] CHIP:DMG: StatusIB = - [1658329868.115260][4587:4592] CHIP:DMG: { - [1658329868.115291][4587:4592] CHIP:DMG: status = 0x00 (SUCCESS), - [1658329868.115333][4587:4592] CHIP:DMG: }, - [1658329868.115371][4587:4592] CHIP:DMG: - [1658329868.115398][4587:4592] CHIP:DMG: }, - [1658329868.115438][4587:4592] CHIP:DMG: - [1658329868.115463][4587:4592] CHIP:DMG: ], - [1658329868.115507][4587:4592] CHIP:DMG: - [1658329868.115531][4587:4592] CHIP:DMG: InteractionModelRevision = 1 - [1658329868.115565][4587:4592] CHIP:DMG: } - [1658329868.115702][4587:4592] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1658329868.115764][4587:4592] CHIP:EM: Sending Standalone Ack for MessageCounter:240702602 on exchange 57878i - disabled: true + identity: "beta" + command: "writeAttribute" + attribute: "ACL" + arguments: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [TH2CommissionerNodeId, 2222], + Targets: null, + FabricIndex: TH2FabricIndex, + }, + { + Privilege: "3", + AuthMode: "3", + Subjects: [4444], + Targets: null, + FabricIndex: TH2FabricIndex, + }, + ] - label: - "TH1 writes DUT Endpoint 0 AccessControl cluster Extension attribute, - value is list of AccessControlExtensionStruct containing 1 element 1. - struct Data field: D_OK_EMPTY" + "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" PICS: ACL.S.A0001 - verification: | - ./chip-tool accesscontrol write extension "[{"data":"1718"}]" 1 0 - On TH1(Chiptool) , Verify Successfully to extension attribute list containg one element - [1658330105.863185][3079:3084] CHIP:DMG: WriteClient moving to [ResponseRe] - [1658330105.863237][3079:3084] CHIP:DMG: WriteResponseMessage = - [1658330105.863262][3079:3084] CHIP:DMG: { - [1658330105.863284][3079:3084] CHIP:DMG: AttributeStatusIBs = - [1658330105.863315][3079:3084] CHIP:DMG: [ - [1658330105.863339][3079:3084] CHIP:DMG: AttributeStatusIB = - [1658330105.863367][3079:3084] CHIP:DMG: { - [1658330105.863393][3079:3084] CHIP:DMG: AttributePathIB = - [1658330105.863428][3079:3084] CHIP:DMG: { - [1658330105.863460][3079:3084] CHIP:DMG: Endpoint = 0x0, - [1658330105.863495][3079:3084] CHIP:DMG: Cluster = 0x1f, - [1658330105.863529][3079:3084] CHIP:DMG: Attribute = 0x0000_0001, - [1658330105.863589][3079:3084] CHIP:DMG: } - [1658330105.863670][3079:3084] CHIP:DMG: - [1658330105.863745][3079:3084] CHIP:DMG: StatusIB = - [1658330105.863812][3079:3084] CHIP:DMG: { - [1658330105.863877][3079:3084] CHIP:DMG: status = 0x00 (SUCCESS), - [1658330105.863945][3079:3084] CHIP:DMG: }, - [1658330105.864010][3079:3084] CHIP:DMG: - [1658330105.864068][3079:3084] CHIP:DMG: }, - [1658330105.864146][3079:3084] CHIP:DMG: - [1658330105.864197][3079:3084] CHIP:DMG: AttributeStatusIB = - [1658330105.864257][3079:3084] CHIP:DMG: { - [1658330105.864315][3079:3084] CHIP:DMG: AttributePathIB = - [1658330105.864379][3079:3084] CHIP:DMG: { - [1658330105.864444][3079:3084] CHIP:DMG: Endpoint = 0x0, - [1658330105.864516][3079:3084] CHIP:DMG: Cluster = 0x1f, - [1658330105.864592][3079:3084] CHIP:DMG: Attribute = 0x0000_0001, - [1658330105.864669][3079:3084] CHIP:DMG: ListIndex = Null, - [1658330105.864736][3079:3084] CHIP:DMG: } - [1658330105.864808][3079:3084] CHIP:DMG: - [1658330105.864871][3079:3084] CHIP:DMG: StatusIB = - [1658330105.864936][3079:3084] CHIP:DMG: { - [1658330105.865001][3079:3084] CHIP:DMG: status = 0x00 (SUCCESS), - [1658330105.865068][3079:3084] CHIP:DMG: }, - [1658330105.865134][3079:3084] CHIP:DMG: - [1658330105.865188][3079:3084] CHIP:DMG: }, - [1658330105.865251][3079:3084] CHIP:DMG: - [1658330105.865302][3079:3084] CHIP:DMG: ], - [1658330105.865370][3079:3084] CHIP:DMG: - [1658330105.865421][3079:3084] CHIP:DMG: InteractionModelRevision = 1 - [1658330105.865472][3079:3084] CHIP:DMG: } - [1658330105.865672][3079:3084] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1658330105.865769][3079:3084] CHIP:EM: Sending Standalone Ack for MessageCounter:104745751 on exchange 216i - disabled: true + command: "writeAttribute" + attribute: "Extension" + arguments: + value: [{ Data: D_OK_EMPTY, FabricIndex: TH1FabricIndex }] - label: - "TH2 writes DUT Endpoint 0 AccessControl cluster Extension attribute - value is list of AccessControlExtensionStruct containing 1 element - 1.struct Data field: D_OK_SINGLE" + "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" + identity: "beta" PICS: ACL.S.A0001 - verification: | - ./chip-tool accesscontrol write extension "[{"data":"17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018"}]" 2 0 --commissioner-nodeid 223344 --commissioner-name beta - - On TH2(Chiptool), Verify Successfully extension attribute list containg one element . + command: "writeAttribute" + attribute: "Extension" + arguments: + value: [{ Data: D_OK_SINGLE, FabricIndex: TH2FabricIndex }] - [1658819083.842765][8349:8354] CHIP:EM: Removed CHIP MessageCounter:249057275 from RetransTable on exchange 59888i - [1658819083.842800][8349:8354] CHIP:DMG: WriteClient moving to [ResponseRe] - [1658819083.842907][8349:8354] CHIP:DMG: WriteResponseMessage = - [1658819083.842939][8349:8354] CHIP:DMG: { - [1658819083.842963][8349:8354] CHIP:DMG: AttributeStatusIBs = - [1658819083.843000][8349:8354] CHIP:DMG: [ - [1658819083.843026][8349:8354] CHIP:DMG: AttributeStatusIB = - [1658819083.843057][8349:8354] CHIP:DMG: { - [1658819083.843086][8349:8354] CHIP:DMG: AttributePathIB = - [1658819083.843120][8349:8354] CHIP:DMG: { - [1658819083.843161][8349:8354] CHIP:DMG: Endpoint = 0x0, - [1658819083.843201][8349:8354] CHIP:DMG: Cluster = 0x1f, - [1658819083.843242][8349:8354] CHIP:DMG: Attribute = 0x0000_0001, - [1658819083.843277][8349:8354] CHIP:DMG: } - [1658819083.843319][8349:8354] CHIP:DMG: - [1658819083.843355][8349:8354] CHIP:DMG: StatusIB = - [1658819083.843393][8349:8354] CHIP:DMG: { - [1658819083.843431][8349:8354] CHIP:DMG: status = 0x00 (SUCCESS), - [1658819083.843466][8349:8354] CHIP:DMG: }, - [1658819083.843504][8349:8354] CHIP:DMG: - [1658819083.843534][8349:8354] CHIP:DMG: }, - [1658819083.843575][8349:8354] CHIP:DMG: - [1658819083.843604][8349:8354] CHIP:DMG: AttributeStatusIB = - [1658819083.843636][8349:8354] CHIP:DMG: { - [1658819083.843666][8349:8354] CHIP:DMG: AttributePathIB = - [1658819083.843700][8349:8354] CHIP:DMG: { - [1658819083.843734][8349:8354] CHIP:DMG: Endpoint = 0x0, - [1658819083.843774][8349:8354] CHIP:DMG: Cluster = 0x1f, - [1658819083.843814][8349:8354] CHIP:DMG: Attribute = 0x0000_0001, - [1658819083.843853][8349:8354] CHIP:DMG: ListIndex = Null, - [1658819083.843888][8349:8354] CHIP:DMG: } - [1658819083.843926][8349:8354] CHIP:DMG: - [1658819083.843962][8349:8354] CHIP:DMG: StatusIB = - [1658819083.843996][8349:8354] CHIP:DMG: { - [1658819083.844030][8349:8354] CHIP:DMG: status = 0x00 (SUCCESS), - [1658819083.844065][8349:8354] CHIP:DMG: }, - [1658819083.844103][8349:8354] CHIP:DMG: - [1658819083.844133][8349:8354] CHIP:DMG: }, - [1658819083.844168][8349:8354] CHIP:DMG: - [1658819083.844194][8349:8354] CHIP:DMG: ], - [1658819083.844230][8349:8354] CHIP:DMG: - [1658819083.844256][8349:8354] CHIP:DMG: InteractionModelRevision = 1 - [1658819083.844282][8349:8354] CHIP:DMG: } - [1658819083.844389][8349:8354] CHIP:DMG: WriteClient moving to [AwaitingDe] - [1658819083.844452][8349:8354] CHIP:EM: Sending Standalone Ack for MessageCounter:27055873 on exchange 59888i - disabled: true + - label: "Step 9: Reboot DUT" + PICS: PICS_SDK_CI_ONLY + cluster: "SystemCommands" + command: "Reboot" - - label: "Reboot the DUT" + - label: "Step 9: Reboot DUT" verification: | - Follow the below procedure for rebooting (Only applicable on raspi) - - - Kill DUT and launch again, without commission follow the next steps - - And in this step use kill DUT and launch again, without commission follow the next steps - disabled: true + Not implemented in YAML + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP + arguments: + values: + - name: "message" + value: "Reboot the DUT and enter 'y' after success" + - name: "expectedValue" + value: "y" + + - label: "TH1 Connects to the device again" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "TH2 Connects to the device again" + identity: "beta" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId2 - - label: "TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute" + - label: + "Step 10:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol read acl 1 0 - - On TH1(Chiptool) , Verify AccessControlEntryStruct containing 2 elements, and MUST NOT contain an element with FabricIndex F2 - - [1657289627.393651][5251:5256] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 1884338152 - [1657289627.393731][5251:5256] CHIP:TOO: ACL: 2 entries - [1657289627.393798][5251:5256] CHIP:TOO: [1]: { - [1657289627.393858][5251:5256] CHIP:TOO: Privilege: 5 - [1657289627.393889][5251:5256] CHIP:TOO: AuthMode: 2 - [1657289627.393935][5251:5256] CHIP:TOO: Subjects: 2 entries - [1657289627.393970][5251:5256] CHIP:TOO: [1]: 112233 - [1657289627.394013][5251:5256] CHIP:TOO: [2]: 1111 - [1657289627.394044][5251:5256] CHIP:TOO: Targets: null - [1657289627.394085][5251:5256] CHIP:TOO: FabricIndex: 1 - [1657289627.394110][5251:5256] CHIP:TOO: } - [1657289627.394157][5251:5256] CHIP:TOO: [2]: { - [1657289627.394183][5251:5256] CHIP:TOO: Privilege: 3 - [1657289627.394212][5251:5256] CHIP:TOO: AuthMode: 3 - [1657289627.394243][5251:5256] CHIP:TOO: Subjects: 1 entries - [1657289627.394286][5251:5256] CHIP:TOO: [1]: 3333 - [1657289627.394318][5251:5256] CHIP:TOO: Targets: null - [1657289627.394356][5251:5256] CHIP:TOO: FabricIndex: 1 - [1657289627.394385][5251:5256] CHIP:TOO: } - disabled: true + command: "readAttribute" + attribute: "ACL" + arguments: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [TH1CommissionerNodeId, 1111], + Targets: null, + FabricIndex: TH1FabricIndex, + }, + { + Privilege: "3", + AuthMode: "3", + Subjects: [3333], + Targets: null, + FabricIndex: TH1FabricIndex, + }, + ] - label: - "TH1 reads DUT Endpoint 0 AccessControl cluster Extension attribute" + "Step 11:TH1 resds DUT Endpoint 0 AccessControl cluster Extension + attribute, value is list of AccessControlExtensionStruct containing 1 + element" PICS: ACL.S.A0001 - verification: | - ./chip-tool accesscontrol read extension 1 0 - On TH1(Chiptool) , Verify Successfully AccessControlExtensionStruct containing 1 element, and MUST NOT contain an element with FabricIndex F2 - - - [1657289676.947323][5260:5265] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0001 DataVersion: 1884338152 - [1657289676.947388][5260:5265] CHIP:TOO: Extension: 1 entries - [1657289676.947438][5260:5265] CHIP:TOO: [1]: { - [1657289676.947467][5260:5265] CHIP:TOO: Data: 1718 - [1657289676.947504][5260:5265] CHIP:TOO: FabricIndex: 1 - [1657289676.947528][5260:5265] CHIP:TOO: } - disabled: true + command: "readAttribute" + attribute: "Extension" + arguments: + value: [{ Data: D_OK_EMPTY, FabricIndex: TH1FabricIndex }] - - label: "TH2 reads DUT Endpoint 0 AccessControl cluster ACL attribute" + - label: + "Step 12:TH2 reads DUT Endpoint 0 AccessControl cluster ACL attribute" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol read acl 2 0 --commissioner-name beta --commissioner-nodeid 223344 - - On TH2(Chiptool) , Verify AccessControlEntryStruct containing 2 elements, and MUST NOT contain an element with FabricIndex F1 - - - [1657289713.626327][19279:19284] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 1884338152 - [1657289713.626381][19279:19284] CHIP:TOO: ACL: 2 entries - [1657289713.626417][19279:19284] CHIP:TOO: [1]: { - [1657289713.626431][19279:19284] CHIP:TOO: Privilege: 5 - [1657289713.626443][19279:19284] CHIP:TOO: AuthMode: 2 - [1657289713.626457][19279:19284] CHIP:TOO: Subjects: 2 entries - [1657289713.626472][19279:19284] CHIP:TOO: [1]: 223344 - [1657289713.626485][19279:19284] CHIP:TOO: [2]: 2222 - [1657289713.626497][19279:19284] CHIP:TOO: Targets: null - [1657289713.626508][19279:19284] CHIP:TOO: FabricIndex: 2 - [1657289713.626519][19279:19284] CHIP:TOO: } - [1657289713.626537][19279:19284] CHIP:TOO: [2]: { - [1657289713.626547][19279:19284] CHIP:TOO: Privilege: 3 - [1657289713.626556][19279:19284] CHIP:TOO: AuthMode: 3 - [1657289713.626568][19279:19284] CHIP:TOO: Subjects: 1 entries - [1657289713.626580][19279:19284] CHIP:TOO: [1]: 4444 - [1657289713.626591][19279:19284] CHIP:TOO: Targets: null - [1657289713.626601][19279:19284] CHIP:TOO: FabricIndex: 2 - [1657289713.626611][19279:19284] CHIP:TOO: } - disabled: true + identity: "beta" + command: "readAttribute" + attribute: "ACL" + response: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [TH2CommissionerNodeId, 2222], + Targets: null, + FabricIndex: TH2FabricIndex, + }, + { + Privilege: "3", + AuthMode: "3", + Subjects: [4444], + Targets: null, + FabricIndex: TH2FabricIndex, + }, + ] - label: - "TH2 reads DUT Endpoint 0 AccessControl cluster Extension attribute" + "Step 13:TH2 reads DUT Endpoint 0 AccessControl cluster Extension + attribute" PICS: ACL.S.A0001 - verification: | - ./chip-tool accesscontrol read extension 2 0 --commissioner-name beta --commissioner-nodeid 223344 - - On TH2(Chiptool) , Verify AccessControlExtensionStruct containing 1 element, and MUST NOT contain an element with FabricIndex F1 - - [1657289746.737641][19293:19298] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0001 DataVersion: 1884338152 - [1657289746.737713][19293:19298] CHIP:TOO: Extension: 1 entries - [1657289746.737778][19293:19298] CHIP:TOO: [1]: { - [1657289746.737803][19293:19298] CHIP:TOO: Data: 17D00000F1FF01003D48656C6C6F20576F726C642E205468697320697320612073696E676C6520656C656D656E74206C6976696E6720617320612063686172737472696E670018 - [1657289746.737844][19293:19298] CHIP:TOO: FabricIndex: 2 - [1657289746.737862][19293:19298] CHIP:TOO: } - disabled: true + identity: "beta" + command: "writeAttribute" + attribute: "Extension" + arguments: + value: [{ Data: D_OK_SINGLE, FabricIndex: TH2FabricIndex }] - label: - "If DUT is an app on host, examine persistent storage in /tmp/chip_kvs - text file" + "Step 14: If DUT is an app on host, examine persistent storage in + /tmp/chip_kvs text file" verification: | sudo vi kvs text file - disabled: true - - - label: "TH1 removes fabric F2 from DUT" - verification: | - ./chip-tool operationalcredentials remove-fabric 2 1 0 - + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" + + - label: "Step 15:TH1 removes fabric F2 from DUT" + PICS: OPCREDS.S.C0a.Rsp + cluster: "Operational Credentials" + command: "RemoveFabric" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "FabricIndex" + value: TH2FabricIndex - On TH1(Chiptool), Verify successfully removed fabric F2 with statusCode as 0(Success) - - [1661404505.702969][18706:18711] CHIP:DMG: - [1661404505.702979][18706:18711] CHIP:DMG: InteractionModelRevision = 1 - [1661404505.702987][18706:18711] CHIP:DMG: }, - [1661404505.703020][18706:18711] CHIP:DMG: Received Command Response Data, Endpoint=0 Cluster=0x0000_003E Command=0x0000_0008 - [1661404505.703047][18706:18711] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_003E Command 0x0000_0008 - [1661404505.703081][18706:18711] CHIP:TOO: NOCResponse: { - [1661404505.703104][18706:18711] CHIP:TOO: statusCode: 0 - [1661404505.703126][18706:18711] CHIP:TOO: fabricIndex: 2 - [1661404505.703139][18706:18711] CHIP:TOO: } - disabled: true - - - label: "TH1 reads DUT Endpoint 0 AccessControl cluster ACL attribute" + - label: + "Step 16:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute" PICS: ACL.S.A0000 - verification: | - ./chip-tool accesscontrol read acl 1 0 - On TH1(Chiptool) , Verify AccessControlEntryStruct containing 2 elements, and MUST NOT contain an element with FabricIndex F2 - - - - [1657289848.956276][5274:5279] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0000 DataVersion: 1884338152 - [1657289848.956366][5274:5279] CHIP:TOO: ACL: 2 entries - [1657289848.956445][5274:5279] CHIP:TOO: [1]: { - [1657289848.956502][5274:5279] CHIP:TOO: Privilege: 5 - [1657289848.956538][5274:5279] CHIP:TOO: AuthMode: 2 - [1657289848.956578][5274:5279] CHIP:TOO: Subjects: 2 entries - [1657289848.956620][5274:5279] CHIP:TOO: [1]: 112233 - [1657289848.956659][5274:5279] CHIP:TOO: [2]: 1111 - [1657289848.956696][5274:5279] CHIP:TOO: Targets: null - [1657289848.956730][5274:5279] CHIP:TOO: FabricIndex: 1 - [1657289848.956764][5274:5279] CHIP:TOO: } - [1657289848.956811][5274:5279] CHIP:TOO: [2]: { - [1657289848.956846][5274:5279] CHIP:TOO: Privilege: 3 - [1657289848.956879][5274:5279] CHIP:TOO: AuthMode: 3 - [1657289848.956916][5274:5279] CHIP:TOO: Subjects: 1 entries - [1657289848.956954][5274:5279] CHIP:TOO: [1]: 3333 - [1657289848.956990][5274:5279] CHIP:TOO: Targets: null - [1657289848.957023][5274:5279] CHIP:TOO: FabricIndex: 1 - [1657289848.957055][5274:5279] CHIP:TOO: } - disabled: true + command: "writeAttribute" + attribute: "ACL" + arguments: + value: + [ + { + Privilege: "5", + AuthMode: "2", + Subjects: [TH1CommissionerNodeId, 1111], + Targets: null, + FabricIndex: TH1FabricIndex, + }, + { + Privilege: "3", + AuthMode: "3", + Subjects: [3333], + Targets: null, + FabricIndex: TH1FabricIndex, + }, + ] - label: - "TH1 reads DUT Endpoint 0 AccessControl cluster Extension attribute" + "Step 17:TH1 reads DUT Endpoint 0 AccessControl cluster Extension + attribute, value is list of AccessControlExtensionStruct containing 1 + element" PICS: ACL.S.A0001 - verification: | - ./chip-tool accesscontrol read extension 1 0 - On TH1(Chiptool), Verify Successfully to AccessControlExtensionStruct containing 1 element, and MUST NOT contain an element with FabricIndex F2 - - - [1657289881.142883][5283:5288] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001F Attribute 0x0000_0001 DataVersion: 1884338152 - [1657289881.142955][5283:5288] CHIP:TOO: Extension: 1 entries - [1657289881.143019][5283:5288] CHIP:TOO: [1]: { - [1657289881.143056][5283:5288] CHIP:TOO: Data: 1718 - [1657289881.143107][5283:5288] CHIP:TOO: FabricIndex: 1 - [1657289881.143138][5283:5288] CHIP:TOO: } - disabled: true + command: "readAttribute" + attribute: "Extension" + arguments: + value: [{ Data: D_OK_EMPTY, FabricIndex: CurrentFabricIndex }] - label: - "If DUT is an app on host, examine persistent storage in /tmp/chip_kvs - text file" + "Step 18: If DUT is an app on host, examine persistent storage in + /tmp/chip_kvs text file" verification: | sudo vi kvs text file - disabled: true + 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_LTIME_1_1.yaml b/src/app/tests/suites/certification/Test_TC_LTIME_1_1.yaml deleted file mode 100644 index 2acf169a605092..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_LTIME_1_1.yaml +++ /dev/null @@ -1,337 +0,0 @@ -# Copyright (c) 2021 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 4.1.1. [TC-LTIME-1.1] Global Attributes [DUT as Client] - -PICS: - - LTIME.C - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: "Note" - verification: | - For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. - - Commission TH(all-clusters-app) to TH(chip-tool) using below command - - TH(all-clusters-app) : ./chip-all-clusters-app --trace_decode 1 - TH(chip-tool) : ./chip-tool pairing onnetwork 1 20202021 --trace_decode 1 - disabled: true - - - label: "Commission DUT to TH" - verification: | - - disabled: true - - - label: "{DUTread} (0xFFFD) ClusterRevision attribute" - PICS: LTIME.C.Afffd - verification: | - ./chip-tool timeformatlocalization read cluster-revision 1 0 - Verify " ClusterRevision " value is of unit16 and reflects the highest revision number, in RPI the value of ClusterRevision is 1 on the TH(all-clusters-app) Log: - ReportDataMessage = - [1666853258.399517][19861:19861] CHIP:DMG: { - [1666853258.399520][19861:19861] CHIP:DMG: AttributeReportIBs = - [1666853258.399527][19861:19861] CHIP:DMG: [ - [1666853258.399531][19861:19861] CHIP:DMG: AttributeReportIB = - [1666853258.399537][19861:19861] CHIP:DMG: { - [1666853258.399541][19861:19861] CHIP:DMG: AttributeDataIB = - [1666853258.399546][19861:19861] CHIP:DMG: { - [1666853258.399551][19861:19861] CHIP:DMG: DataVersion = 0x1b209c0b, - [1666853258.399555][19861:19861] CHIP:DMG: AttributePathIB = - [1666853258.399560][19861:19861] CHIP:DMG: { - [1666853258.399565][19861:19861] CHIP:DMG: Endpoint = 0x0, - [1666853258.399569][19861:19861] CHIP:DMG: Cluster = 0x2c, - [1666853258.399574][19861:19861] CHIP:DMG: Attribute = 0x0000_FFFD, - [1666853258.399579][19861:19861] CHIP:DMG: } - [1666853258.399584][19861:19861] CHIP:DMG: - [1666853258.399589][19861:19861] CHIP:DMG: Data = 1, - [1666853258.399593][19861:19861] CHIP:DMG: }, - [1666853258.399598][19861:19861] CHIP:DMG: - [1666853258.399602][19861:19861] CHIP:DMG: }, - [1666853258.399607][19861:19861] CHIP:DMG: - [1666853258.399611][19861:19861] CHIP:DMG: ], - [1666853258.399617][19861:19861] CHIP:DMG: - [1666853258.399621][19861:19861] CHIP:DMG: SuppressResponse = true, - [1666853258.399623][19861:19861] CHIP:DMG: InteractionModelRevision = 1 - [1666853258.399628][19861:19861] CHIP:DMG: } - disabled: true - - - label: "{DUTread} (0xFFFC) FeatureMap attribute" - PICS: LTIME.C.Afffc - verification: | - Out of scope for V1.0 - - https://github.com/project-chip/connectedhomeip/issues/18989 - disabled: true - - - label: "{DUTread} (0xFFFB) AttributeList attribute" - PICS: LTIME.C.Afffb - verification: | - ./chip-tool timeformatlocalization read attribute-list 1 0 - Verify " AttributeList " value consists the list of mandatory attributes (values 0, 1 and 2), global attributes (65528, 65529, 65531, 65532, 65533) on the TH(all-clusters-app) Log: - ReportDataMessage = - [1666853311.208553][19861:19861] CHIP:DMG: { - [1666853311.208555][19861:19861] CHIP:DMG: AttributeReportIBs = - [1666853311.208561][19861:19861] CHIP:DMG: [ - [1666853311.208564][19861:19861] CHIP:DMG: AttributeReportIB = - [1666853311.208570][19861:19861] CHIP:DMG: { - [1666853311.208573][19861:19861] CHIP:DMG: AttributeDataIB = - [1666853311.208577][19861:19861] CHIP:DMG: { - [1666853311.208582][19861:19861] CHIP:DMG: DataVersion = 0x1b209c0b, - [1666853311.208585][19861:19861] CHIP:DMG: AttributePathIB = - [1666853311.208588][19861:19861] CHIP:DMG: { - [1666853311.208592][19861:19861] CHIP:DMG: Endpoint = 0x0, - [1666853311.208595][19861:19861] CHIP:DMG: Cluster = 0x2c, - [1666853311.208601][19861:19861] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666853311.208607][19861:19861] CHIP:DMG: } - [1666853311.208613][19861:19861] CHIP:DMG: - [1666853311.208617][19861:19861] CHIP:DMG: Data = [ - [1666853311.208621][19861:19861] CHIP:DMG: - [1666853311.208625][19861:19861] CHIP:DMG: ], - [1666853311.208629][19861:19861] CHIP:DMG: }, - [1666853311.208635][19861:19861] CHIP:DMG: - [1666853311.208638][19861:19861] CHIP:DMG: }, - [1666853311.208648][19861:19861] CHIP:DMG: - [1666853311.208651][19861:19861] CHIP:DMG: AttributeReportIB = - [1666853311.208658][19861:19861] CHIP:DMG: { - [1666853311.208662][19861:19861] CHIP:DMG: AttributeDataIB = - [1666853311.208666][19861:19861] CHIP:DMG: { - [1666853311.208670][19861:19861] CHIP:DMG: DataVersion = 0x1b209c0b, - [1666853311.208676][19861:19861] CHIP:DMG: AttributePathIB = - [1666853311.208680][19861:19861] CHIP:DMG: { - [1666853311.208684][19861:19861] CHIP:DMG: Endpoint = 0x0, - [1666853311.208688][19861:19861] CHIP:DMG: Cluster = 0x2c, - [1666853311.208693][19861:19861] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666853311.208696][19861:19861] CHIP:DMG: ListIndex = Null, - [1666853311.208703][19861:19861] CHIP:DMG: } - [1666853311.208708][19861:19861] CHIP:DMG: - [1666853311.208713][19861:19861] CHIP:DMG: Data = 0, - [1666853311.208717][19861:19861] CHIP:DMG: }, - [1666853311.208724][19861:19861] CHIP:DMG: - [1666853311.208727][19861:19861] CHIP:DMG: }, - [1666853311.208735][19861:19861] CHIP:DMG: - [1666853311.208738][19861:19861] CHIP:DMG: AttributeReportIB = - [1666853311.208745][19861:19861] CHIP:DMG: { - [1666853311.208749][19861:19861] CHIP:DMG: AttributeDataIB = - [1666853311.208753][19861:19861] CHIP:DMG: { - [1666853311.208758][19861:19861] CHIP:DMG: DataVersion = 0x1b209c0b, - [1666853311.208762][19861:19861] CHIP:DMG: AttributePathIB = - [1666853311.208767][19861:19861] CHIP:DMG: { - [1666853311.208771][19861:19861] CHIP:DMG: Endpoint = 0x0, - [1666853311.208776][19861:19861] CHIP:DMG: Cluster = 0x2c, - [1666853311.208781][19861:19861] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666853311.208786][19861:19861] CHIP:DMG: ListIndex = Null, - [1666853311.208791][19861:19861] CHIP:DMG: } - [1666853311.208797][19861:19861] CHIP:DMG: - [1666853311.208801][19861:19861] CHIP:DMG: Data = 1, - [1666853311.208805][19861:19861] CHIP:DMG: }, - [1666853311.208812][19861:19861] CHIP:DMG: - [1666853311.208815][19861:19861] CHIP:DMG: }, - [1666853311.208824][19861:19861] CHIP:DMG: - [1666853311.208827][19861:19861] CHIP:DMG: AttributeReportIB = - [1666853311.208834][19861:19861] CHIP:DMG: { - [1666853311.208838][19861:19861] CHIP:DMG: AttributeDataIB = - [1666853311.208842][19861:19861] CHIP:DMG: { - [1666853311.208846][19861:19861] CHIP:DMG: DataVersion = 0x1b209c0b, - [1666853311.208850][19861:19861] CHIP:DMG: AttributePathIB = - [1666853311.208854][19861:19861] CHIP:DMG: { - [1666853311.208858][19861:19861] CHIP:DMG: Endpoint = 0x0, - [1666853311.208863][19861:19861] CHIP:DMG: Cluster = 0x2c, - [1666853311.208867][19861:19861] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666853311.208872][19861:19861] CHIP:DMG: ListIndex = Null, - [1666853311.208877][19861:19861] CHIP:DMG: } - [1666853311.208883][19861:19861] CHIP:DMG: - [1666853311.208887][19861:19861] CHIP:DMG: Data = 2, - [1666853311.208892][19861:19861] CHIP:DMG: }, - [1666853311.208899][19861:19861] CHIP:DMG: - [1666853311.208902][19861:19861] CHIP:DMG: }, - [1666853311.208911][19861:19861] CHIP:DMG: - [1666853311.208914][19861:19861] CHIP:DMG: AttributeReportIB = - [1666853311.208921][19861:19861] CHIP:DMG: { - [1666853311.208926][19861:19861] CHIP:DMG: AttributeDataIB = - [1666853311.208929][19861:19861] CHIP:DMG: { - [1666853311.208934][19861:19861] CHIP:DMG: DataVersion = 0x1b209c0b, - [1666853311.208938][19861:19861] CHIP:DMG: AttributePathIB = - [1666853311.208943][19861:19861] CHIP:DMG: { - [1666853311.208947][19861:19861] CHIP:DMG: Endpoint = 0x0, - [1666853311.208952][19861:19861] CHIP:DMG: Cluster = 0x2c, - [1666853311.208956][19861:19861] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666853311.208960][19861:19861] CHIP:DMG: ListIndex = Null, - [1666853311.208964][19861:19861] CHIP:DMG: } - [1666853311.208970][19861:19861] CHIP:DMG: - [1666853311.208975][19861:19861] CHIP:DMG: Data = 65528, - [1666853311.208979][19861:19861] CHIP:DMG: }, - [1666853311.208984][19861:19861] CHIP:DMG: - [1666853311.208988][19861:19861] CHIP:DMG: }, - [1666853311.208995][19861:19861] CHIP:DMG: - [1666853311.208998][19861:19861] CHIP:DMG: AttributeReportIB = - [1666853311.209005][19861:19861] CHIP:DMG: { - [1666853311.209008][19861:19861] CHIP:DMG: AttributeDataIB = - [1666853311.209013][19861:19861] CHIP:DMG: { - [1666853311.209017][19861:19861] CHIP:DMG: DataVersion = 0x1b209c0b, - [1666853311.209023][19861:19861] CHIP:DMG: AttributePathIB = - [1666853311.209028][19861:19861] CHIP:DMG: { - [1666853311.209033][19861:19861] CHIP:DMG: Endpoint = 0x0, - [1666853311.209039][19861:19861] CHIP:DMG: Cluster = 0x2c, - [1666853311.209042][19861:19861] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666853311.209047][19861:19861] CHIP:DMG: ListIndex = Null, - [1666853311.209051][19861:19861] CHIP:DMG: } - [1666853311.209055][19861:19861] CHIP:DMG: - [1666853311.209060][19861:19861] CHIP:DMG: Data = 65529, - [1666853311.209064][19861:19861] CHIP:DMG: }, - [1666853311.209069][19861:19861] CHIP:DMG: - [1666853311.209074][19861:19861] CHIP:DMG: }, - [1666853311.209083][19861:19861] CHIP:DMG: - [1666853311.209086][19861:19861] CHIP:DMG: AttributeReportIB = - [1666853311.209092][19861:19861] CHIP:DMG: { - [1666853311.209095][19861:19861] CHIP:DMG: AttributeDataIB = - [1666853311.209100][19861:19861] CHIP:DMG: { - [1666853311.209104][19861:19861] CHIP:DMG: DataVersion = 0x1b209c0b, - [1666853311.209108][19861:19861] CHIP:DMG: AttributePathIB = - [1666853311.209113][19861:19861] CHIP:DMG: { - [1666853311.209118][19861:19861] CHIP:DMG: Endpoint = 0x0, - [1666853311.209122][19861:19861] CHIP:DMG: Cluster = 0x2c, - [1666853311.209127][19861:19861] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666853311.209131][19861:19861] CHIP:DMG: ListIndex = Null, - [1666853311.209135][19861:19861] CHIP:DMG: } - [1666853311.209140][19861:19861] CHIP:DMG: - [1666853311.209145][19861:19861] CHIP:DMG: Data = 65531, - [1666853311.209149][19861:19861] CHIP:DMG: }, - [1666853311.209155][19861:19861] CHIP:DMG: - [1666853311.209157][19861:19861] CHIP:DMG: }, - [1666853311.209166][19861:19861] CHIP:DMG: - [1666853311.209169][19861:19861] CHIP:DMG: AttributeReportIB = - [1666853311.209175][19861:19861] CHIP:DMG: { - [1666853311.209178][19861:19861] CHIP:DMG: AttributeDataIB = - [1666853311.209183][19861:19861] CHIP:DMG: { - [1666853311.209187][19861:19861] CHIP:DMG: DataVersion = 0x1b209c0b, - [1666853311.209193][19861:19861] CHIP:DMG: AttributePathIB = - [1666853311.209197][19861:19861] CHIP:DMG: { - [1666853311.209200][19861:19861] CHIP:DMG: Endpoint = 0x0, - [1666853311.209204][19861:19861] CHIP:DMG: Cluster = 0x2c, - [1666853311.209210][19861:19861] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666853311.209214][19861:19861] CHIP:DMG: ListIndex = Null, - [1666853311.209219][19861:19861] CHIP:DMG: } - [1666853311.209224][19861:19861] CHIP:DMG: - [1666853311.209229][19861:19861] CHIP:DMG: Data = 65532, - [1666853311.209233][19861:19861] CHIP:DMG: }, - [1666853311.209240][19861:19861] CHIP:DMG: - [1666853311.209244][19861:19861] CHIP:DMG: }, - [1666853311.209254][19861:19861] CHIP:DMG: - [1666853311.209257][19861:19861] CHIP:DMG: AttributeReportIB = - [1666853311.209264][19861:19861] CHIP:DMG: { - [1666853311.209268][19861:19861] CHIP:DMG: AttributeDataIB = - [1666853311.209272][19861:19861] CHIP:DMG: { - [1666853311.209276][19861:19861] CHIP:DMG: DataVersion = 0x1b209c0b, - [1666853311.209280][19861:19861] CHIP:DMG: AttributePathIB = - [1666853311.209285][19861:19861] CHIP:DMG: { - [1666853311.209288][19861:19861] CHIP:DMG: Endpoint = 0x0, - [1666853311.209294][19861:19861] CHIP:DMG: Cluster = 0x2c, - [1666853311.209299][19861:19861] CHIP:DMG: Attribute = 0x0000_FFFB, - [1666853311.209303][19861:19861] CHIP:DMG: ListIndex = Null, - [1666853311.209308][19861:19861] CHIP:DMG: } - [1666853311.209313][19861:19861] CHIP:DMG: - [1666853311.209319][19861:19861] CHIP:DMG: Data = 65533, - [1666853311.209323][19861:19861] CHIP:DMG: }, - [1666853311.209329][19861:19861] CHIP:DMG: - [1666853311.209334][19861:19861] CHIP:DMG: }, - [1666853311.209339][19861:19861] CHIP:DMG: - [1666853311.209343][19861:19861] CHIP:DMG: ], - [1666853311.209364][19861:19861] CHIP:DMG: - [1666853311.209368][19861:19861] CHIP:DMG: SuppressResponse = true, - [1666853311.209372][19861:19861] CHIP:DMG: InteractionModelRevision = 1 - [1666853311.209376][19861:19861] CHIP:DMG: } - disabled: true - - - label: "{DUTread} (0xFFFA) EventList attribute" - PICS: LTIME.C.Afffa - verification: | - Out of scope for V1.0 - disabled: true - - - label: "{DUTread} (0xFFF9) AcceptedCommandList attribute" - PICS: LTIME.C.Afff9 - verification: | - ./chip-tool timeformatlocalization read accepted-command-list 1 0 - Verify "AcceptedCommandList " consists the list of supported commands, Also verify that the DUT response with an empty list (0 entries) if there is no accepted command on the TH(all-clusters-app) Log: - - ReportDataMessage = - [1666853382.409750][19861:19861] CHIP:DMG: { - [1666853382.409753][19861:19861] CHIP:DMG: AttributeReportIBs = - [1666853382.409758][19861:19861] CHIP:DMG: [ - [1666853382.409761][19861:19861] CHIP:DMG: AttributeReportIB = - [1666853382.409766][19861:19861] CHIP:DMG: { - [1666853382.409769][19861:19861] CHIP:DMG: AttributeDataIB = - [1666853382.409772][19861:19861] CHIP:DMG: { - [1666853382.409776][19861:19861] CHIP:DMG: DataVersion = 0x1b209c0b, - [1666853382.409779][19861:19861] CHIP:DMG: AttributePathIB = - [1666853382.409782][19861:19861] CHIP:DMG: { - [1666853382.409786][19861:19861] CHIP:DMG: Endpoint = 0x0, - [1666853382.409790][19861:19861] CHIP:DMG: Cluster = 0x2c, - [1666853382.409795][19861:19861] CHIP:DMG: Attribute = 0x0000_FFF9, - [1666853382.409798][19861:19861] CHIP:DMG: } - [1666853382.409802][19861:19861] CHIP:DMG: - [1666853382.409805][19861:19861] CHIP:DMG: Data = [ - [1666853382.409809][19861:19861] CHIP:DMG: - [1666853382.409813][19861:19861] CHIP:DMG: ], - [1666853382.409816][19861:19861] CHIP:DMG: }, - [1666853382.409821][19861:19861] CHIP:DMG: - [1666853382.409824][19861:19861] CHIP:DMG: }, - [1666853382.409828][19861:19861] CHIP:DMG: - [1666853382.409831][19861:19861] CHIP:DMG: ], - [1666853382.409837][19861:19861] CHIP:DMG: - [1666853382.409840][19861:19861] CHIP:DMG: SuppressResponse = true, - [1666853382.409843][19861:19861] CHIP:DMG: InteractionModelRevision = 1 - [1666853382.409846][19861:19861] CHIP:DMG: } - disabled: true - - - label: "{DUTread} (0xFFF8) GeneratedCommandList attribute" - PICS: LTIME.C.Afff8 - verification: | - ./chip-tool timeformatlocalization read generated-command-list 1 0 - Verify " GeneratedCommandList " consists the list of supported commands, Also verify that the DUT response with an empty list (0 entries) if there is no generated command on the TH(all-clusters-app) Log: - ReportDataMessage = - [1666853414.158719][19861:19861] CHIP:DMG: { - [1666853414.158722][19861:19861] CHIP:DMG: AttributeReportIBs = - [1666853414.158729][19861:19861] CHIP:DMG: [ - [1666853414.158733][19861:19861] CHIP:DMG: AttributeReportIB = - [1666853414.158741][19861:19861] CHIP:DMG: { - [1666853414.158746][19861:19861] CHIP:DMG: AttributeDataIB = - [1666853414.158751][19861:19861] CHIP:DMG: { - [1666853414.158756][19861:19861] CHIP:DMG: DataVersion = 0x1b209c0b, - [1666853414.158761][19861:19861] CHIP:DMG: AttributePathIB = - [1666853414.158764][19861:19861] CHIP:DMG: { - [1666853414.158768][19861:19861] CHIP:DMG: Endpoint = 0x0, - [1666853414.158771][19861:19861] CHIP:DMG: Cluster = 0x2c, - [1666853414.158775][19861:19861] CHIP:DMG: Attribute = 0x0000_FFF8, - [1666853414.158778][19861:19861] CHIP:DMG: } - [1666853414.158781][19861:19861] CHIP:DMG: - [1666853414.158785][19861:19861] CHIP:DMG: Data = [ - [1666853414.158788][19861:19861] CHIP:DMG: - [1666853414.158791][19861:19861] CHIP:DMG: ], - [1666853414.158794][19861:19861] CHIP:DMG: }, - [1666853414.158799][19861:19861] CHIP:DMG: - [1666853414.158801][19861:19861] CHIP:DMG: }, - [1666853414.158806][19861:19861] CHIP:DMG: - [1666853414.158809][19861:19861] CHIP:DMG: ], - [1666853414.158814][19861:19861] CHIP:DMG: - [1666853414.158817][19861:19861] CHIP:DMG: SuppressResponse = true, - [1666853414.158820][19861:19861] CHIP:DMG: InteractionModelRevision = 1 - [1666853414.158822][19861:19861] CHIP:DMG: } - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_LTIME_1_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_LTIME_1_1_Simulated.yaml new file mode 100644 index 00000000000000..d92644f4ebf741 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_LTIME_1_1_Simulated.yaml @@ -0,0 +1,59 @@ +# Copyright (c) 2023 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# 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: 108.1.1. [TC-LTIME-1.1] Global Attributes [DUT as Client] + +PICS: + - LTIME.C + +config: + nodeId: 0x12344321 + cluster: "Time Format Localization" + endpoint: 0 + +tests: + - label: "Wait for the device to be commissioned" + cluster: "DelayCommands" + command: "WaitForCommissioning" + + - label: "DUT read (0xFFFD) ClusterRevision attribute" + PICS: LTIME.C.Afffd + wait: "readAttribute" + attribute: "ClusterRevision" + + - label: "DUT read (0xFFFC) FeatureMap attribute" + PICS: LTIME.C.Afffc + wait: "readAttribute" + attribute: "FeatureMap" + + - label: "DUT read (0xFFFB) AttributeList attribute" + PICS: LTIME.C.Afffb + wait: "readAttribute" + attribute: "AttributeList" + + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: "DUT read (0xFFFA) EventList attribute" + # PICS: LTIME.C.Afffa + # wait: "readAttribute" + # attribute: "EventList" + + - label: "DUT read (0xFFF9) AcceptedCommandList attribute" + PICS: LTIME.C.Afff9 + wait: "readAttribute" + attribute: "AcceptedCommandList" + + - label: "DUT read (0xFFF8) GeneratedCommandList attribute" + PICS: LTIME.C.Afff8 + wait: "readAttribute" + attribute: "GeneratedCommandList" diff --git a/src/app/tests/suites/ciTests.json b/src/app/tests/suites/ciTests.json index 857e538f59e75f..0c5f5f95167197 100644 --- a/src/app/tests/suites/ciTests.json +++ b/src/app/tests/suites/ciTests.json @@ -8,7 +8,8 @@ "Test_TC_ACL_2_4", "Test_TC_ACL_2_7", "Test_TC_ACL_2_8", - "Test_TC_ACL_2_9" + "Test_TC_ACL_2_9", + "Test_TC_ACL_2_10" ], "BooleanState": ["Test_TC_BOOL_1_1", "Test_TC_BOOL_2_1"], "Binding": ["Test_TC_BIND_1_1"], diff --git a/src/app/tests/suites/manualTests.json b/src/app/tests/suites/manualTests.json index f821ed9049e9fe..9b2572bda680d8 100644 --- a/src/app/tests/suites/manualTests.json +++ b/src/app/tests/suites/manualTests.json @@ -282,11 +282,7 @@ "Test_TC_DGTHREAD_3_5" ], "Actions": ["Test_TC_ACT_2_1", "Test_TC_ACT_2_2", "Test_TC_ACT_3_2"], - "TimeFormatLocalization": [ - "Test_TC_LTIME_1_1", - "Test_TC_LTIME_2_1", - "Test_TC_LTIME_3_1" - ], + "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"], "Scenes": [ @@ -297,7 +293,7 @@ "Test_TC_S_3_1" ], "PumpConfigurationControl": ["Test_TC_PCC_3_1"], - "AccessControl": ["Test_TC_ACL_2_5", "Test_TC_ACL_2_6", "Test_TC_ACL_2_10"], + "AccessControl": ["Test_TC_ACL_2_5", "Test_TC_ACL_2_6"], "UserLabel": [], "BridgedDeviceBasicInformation": [ "Test_TC_BRBINFO_2_2", diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 1eaa2e83eb8bca..755fb2ce055dc9 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -44,6 +44,7 @@ class TestList : public Command printf("Test_TC_ACL_2_7\n"); printf("Test_TC_ACL_2_8\n"); printf("Test_TC_ACL_2_9\n"); + printf("Test_TC_ACL_2_10\n"); printf("Test_TC_BOOL_1_1\n"); printf("Test_TC_BOOL_2_1\n"); printf("Test_TC_BRBINFO_1_1\n"); @@ -542,7 +543,6 @@ class ManualTestList : public Command printf("Test_TC_ACT_2_1\n"); printf("Test_TC_ACT_2_2\n"); printf("Test_TC_ACT_3_2\n"); - printf("Test_TC_LTIME_1_1\n"); printf("Test_TC_LTIME_2_1\n"); printf("Test_TC_LTIME_3_1\n"); printf("Test_TC_BIND_2_1\n"); @@ -556,7 +556,6 @@ class ManualTestList : public Command printf("Test_TC_PCC_3_1\n"); printf("Test_TC_ACL_2_5\n"); printf("Test_TC_ACL_2_6\n"); - printf("Test_TC_ACL_2_10\n"); printf("Test_TC_BRBINFO_2_2\n"); printf("Test_TC_BRBINFO_2_3\n"); printf("Test_TC_ACE_1_1\n"); @@ -6777,18 +6776,25 @@ class Test_TC_ACL_2_9Suite : public TestCommand } }; -class Test_TC_BOOL_1_1Suite : public TestCommand +class Test_TC_ACL_2_10Suite : public TestCommand { public: - Test_TC_BOOL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BOOL_1_1", 6, credsIssuerConfig) + Test_TC_ACL_2_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_10", 23, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("nodeId2", 0, UINT64_MAX, &mNodeId2); + AddArgument("TH1CommissionerNodeId", 0, UINT64_MAX, &mTH1CommissionerNodeId); + AddArgument("TH2CommissionerNodeId", 0, UINT64_MAX, &mTH2CommissionerNodeId); + AddArgument("discriminator", 0, UINT16_MAX, &mDiscriminator); + AddArgument("payload", &mPayload); + AddArgument("D_OK_EMPTY", &mDOkEmpty); + AddArgument("D_OK_SINGLE", &mDOkSingle); AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BOOL_1_1Suite() {} + ~Test_TC_ACL_2_10Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -6799,8 +6805,18 @@ class Test_TC_BOOL_1_1Suite : public TestCommand chip::Optional mNodeId; chip::Optional mCluster; chip::Optional mEndpoint; + chip::Optional mNodeId2; + chip::Optional mTH1CommissionerNodeId; + chip::Optional mTH2CommissionerNodeId; + chip::Optional mDiscriminator; + chip::Optional mPayload; + chip::Optional mDOkEmpty; + chip::Optional mDOkSingle; chip::Optional mTimeout; + uint8_t TH1FabricIndex; + uint8_t TH2FabricIndex; + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } // @@ -6828,171 +6844,751 @@ class Test_TC_BOOL_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")); + TH1FabricIndex = value; } break; case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - uint32_t value; + uint8_t value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckValue("featureMap", value, 0UL)); - VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + TH2FabricIndex = value; } break; - case 3: + 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)); + shouldContinue = true; + break; + case 11: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 12: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + 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)); { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> + value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); } break; - case 4: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> + value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 5: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - chip::app::DataModel::DecodableList value; + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlEntryStruct::DecodableType> + value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); { auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 0)); + VerifyOrReturn(CheckValue("acl[0].privilege", iter_0.GetValue().privilege, 5U)); + VerifyOrReturn(CheckValue("acl[0].authMode", iter_0.GetValue().authMode, 2U)); + VerifyOrReturn(CheckValueNonNull("acl[0].subjects", iter_0.GetValue().subjects)); + { + auto iter_3 = iter_0.GetValue().subjects.Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[0].subjects.Value()", iter_3, 0)); + VerifyOrReturn(CheckValue("acl[0].subjects.Value()[0]", iter_3.GetValue(), + mTH2CommissionerNodeId.HasValue() ? mTH2CommissionerNodeId.Value() : 112233ULL)); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[0].subjects.Value()", iter_3, 1)); + VerifyOrReturn(CheckValue("acl[0].subjects.Value()[1]", iter_3.GetValue(), 2222ULL)); + VerifyOrReturn(CheckNoMoreListItems("acl[0].subjects.Value()", + iter_3, 2)); + } + VerifyOrReturn(CheckValueNull("acl[0].targets", iter_0.GetValue().targets)); + VerifyOrReturn(CheckValue("acl[0].fabricIndex", iter_0.GetValue().fabricIndex, TH2FabricIndex)); + VerifyOrReturn(CheckNextListItemDecodes("acl", iter_0, 1)); + VerifyOrReturn(CheckValue("acl[1].privilege", iter_0.GetValue().privilege, 3U)); + VerifyOrReturn(CheckValue("acl[1].authMode", iter_0.GetValue().authMode, 3U)); + VerifyOrReturn(CheckValueNonNull("acl[1].subjects", iter_0.GetValue().subjects)); + { + auto iter_3 = iter_0.GetValue().subjects.Value().begin(); + VerifyOrReturn(CheckNextListItemDecodes( + "acl[1].subjects.Value()", iter_3, 0)); + VerifyOrReturn(CheckValue("acl[1].subjects.Value()[0]", iter_3.GetValue(), 4444ULL)); + VerifyOrReturn(CheckNoMoreListItems("acl[1].subjects.Value()", + iter_3, 1)); + } + VerifyOrReturn(CheckValueNull("acl[1].targets", iter_0.GetValue().targets)); + VerifyOrReturn(CheckValue("acl[1].fabricIndex", iter_0.GetValue().fabricIndex, TH2FabricIndex)); + VerifyOrReturn(CheckNoMoreListItems("acl", iter_0, 2)); } - 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; - // Allow yaml to access the current commissioner node id. - // Default to 0 (undefined node id) so we know if this isn't - // set correctly. - // Reset on every step in case it changed. - chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); - (void) commissionerNodeId; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "read the global attribute: ClusterRevision"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, BooleanState::Attributes::ClusterRevision::Id, - true, chip::NullOptional); - } - case 2: { - LogStep(2, "Read the global attribute: FeatureMap"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, BooleanState::Attributes::FeatureMap::Id, true, - chip::NullOptional); - } - case 3: { - LogStep(3, "Read the global attribute: AttributeList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, BooleanState::Attributes::AttributeList::Id, - true, chip::NullOptional); - } - case 4: { - LogStep(4, "Read the global attribute: AcceptedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, - BooleanState::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); - } - case 5: { - LogStep(5, "Read the global attribute: GeneratedCommandList"); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, - BooleanState::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_BOOL_2_1Suite : public TestCommand -{ -public: - Test_TC_BOOL_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BOOL_2_1", 2, credsIssuerConfig) - { - AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); - AddArgument("cluster", &mCluster); - AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); - AddArgument("timeout", 0, UINT16_MAX, &mTimeout); - } - - ~Test_TC_BOOL_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 - { - - // Allow yaml to access the current commissioner node id. - // Default to 0 (undefined node id) so we know if this isn't - // set correctly. - // Reset on every step in case it changed. - chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); - (void) commissionerNodeId; - - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - case 0: + 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 1: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { - bool value; + chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); + } + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList< + chip::app::Clusters::AccessControl::Structs::AccessControlExtensionStruct::DecodableType> + value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + } + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + // Allow yaml to access the current commissioner node id. + // Default to 0 (undefined node id) so we know if this isn't + // set correctly. + // Reset on every step in case it changed. + chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); + (void) commissionerNodeId; + switch (testIndex) + { + case 0: { + LogStep(0, "Step 1: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, "Step 2:TH1 reads OperationalCredentials cluster CurrentFabricIndex attribute"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "Step 3:TH1 puts DUT into commissioning mode, TH2 commissions DUT using admin node ID N2"); + ListFreer listFreer; + chip::app::Clusters::AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Type value; + value.commissioningTimeout = 180U; + return SendCommand(kIdentityAlpha, GetEndpoint(0), AdministratorCommissioning::Id, + AdministratorCommissioning::Commands::OpenBasicCommissioningWindow::Id, value, + chip::Optional(10000), chip::NullOptional + + ); + } + case 3: { + LogStep(3, "TH2 starts a commissioning process with DUT"); + ListFreer listFreer; + chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); + return PairWithCode(kIdentityBeta, value); + } + case 4: { + LogStep(4, "DUT is commissioned by TH2 on Fabric ID2 "); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + return WaitForCommissionee(kIdentityBeta, value); + } + case 5: { + LogStep(5, "Step 4:TH2 reads OperationalCredentials cluster CurrentFabricIndex attribute"); + return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); + } + case 6: { + LogStep(6, "Step 5:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(2); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); + listHolder_0->mList[0].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(2); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = mTH1CommissionerNodeId.HasValue() ? mTH1CommissionerNodeId.Value() : 112233ULL; + listHolder_3->mList[1] = 1111ULL; + listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 2); + } + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = TH1FabricIndex; + + listHolder_0->mList[1].privilege = + static_cast(3); + listHolder_0->mList[1].authMode = + static_cast(3); + listHolder_0->mList[1].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = 3333ULL; + listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[1].targets.SetNull(); + listHolder_0->mList[1].fabricIndex = TH1FabricIndex; + + value = chip::app::DataModel::List( + listHolder_0->mList, 2); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 7: { + LogStep(7, "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; + + { + auto * listHolder_0 = + new ListHolder(2); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); + listHolder_0->mList[0].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(2); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = mTH2CommissionerNodeId.HasValue() ? mTH2CommissionerNodeId.Value() : 112233ULL; + listHolder_3->mList[1] = 2222ULL; + listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 2); + } + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = TH2FabricIndex; + + listHolder_0->mList[1].privilege = + static_cast(3); + listHolder_0->mList[1].authMode = + static_cast(3); + listHolder_0->mList[1].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = 4444ULL; + listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[1].targets.SetNull(); + listHolder_0->mList[1].fabricIndex = TH2FabricIndex; + + value = chip::app::DataModel::List( + listHolder_0->mList, 2); + } + return WriteAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 8: { + LogStep(8, + "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)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(1); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].data = + mDOkEmpty.HasValue() ? mDOkEmpty.Value() : chip::ByteSpan(chip::Uint8::from_const_char("\x17\x18"), 2); + listHolder_0->mList[0].fabricIndex = TH1FabricIndex; + + value = chip::app::DataModel::List( + listHolder_0->mList, 1); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, + value, chip::NullOptional, chip::NullOptional); + } + case 9: { + LogStep(9, + "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)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(1); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].data = mDOkSingle.HasValue() + ? mDOkSingle.Value() + : chip::ByteSpan( + chip::Uint8::from_const_char( + "\x17\xD0\x00\x00\xF1\xFF\x01\x00\x3D\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x2E\x20\x54\x68\x69" + "\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20\x6C\x69\x76" + "\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00\x18"), + 71); + listHolder_0->mList[0].fabricIndex = TH2FabricIndex; + + value = chip::app::DataModel::List( + listHolder_0->mList, 1); + } + return WriteAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 10: { + LogStep(10, "Step 9: Reboot DUT"); + VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::SystemCommands::Commands::Reboot::Type value; + return Reboot(kIdentityAlpha, value); + } + case 11: { + LogStep(11, "Step 9: Reboot DUT"); + 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("Reboot the DUT and enter 'y' after successgarbage: not in length on purpose", 42); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 12: { + LogStep(12, "TH1 Connects to the device again"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 13: { + LogStep(13, "TH2 Connects to the device again"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId2.HasValue() ? mNodeId2.Value() : 51966ULL; + return WaitForCommissionee(kIdentityBeta, value); + } + case 14: { + LogStep(14, "Step 10:TH1 writes DUT Endpoint 0 AccessControl cluster ACL attribute"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, + chip::NullOptional); + } + case 15: { + LogStep(15, + "Step 11:TH1 resds DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " + "AccessControlExtensionStruct containing 1 element"); + VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, true, + chip::NullOptional); + } + case 16: { + LogStep(16, "Step 12:TH2 reads DUT Endpoint 0 AccessControl cluster ACL attribute"); + VerifyOrDo(!ShouldSkip("ACL.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, true, + chip::NullOptional); + } + case 17: { + LogStep(17, "Step 13:TH2 reads DUT Endpoint 0 AccessControl cluster Extension attribute"); + VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::DataModel::List value; + + { + auto * listHolder_0 = + new ListHolder(1); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].data = mDOkSingle.HasValue() + ? mDOkSingle.Value() + : chip::ByteSpan( + chip::Uint8::from_const_char( + "\x17\xD0\x00\x00\xF1\xFF\x01\x00\x3D\x48\x65\x6C\x6C\x6F\x20\x57\x6F\x72\x6C\x64\x2E\x20\x54\x68\x69" + "\x73\x20\x69\x73\x20\x61\x20\x73\x69\x6E\x67\x6C\x65\x20\x65\x6C\x65\x6D\x65\x6E\x74\x20\x6C\x69\x76" + "\x69\x6E\x67\x20\x61\x73\x20\x61\x20\x63\x68\x61\x72\x73\x74\x72\x69\x6E\x67\x00\x18"), + 71); + listHolder_0->mList[0].fabricIndex = TH2FabricIndex; + + value = chip::app::DataModel::List( + listHolder_0->mList, 1); + } + return WriteAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 18: { + LogStep(18, "Step 14: If DUT is an app on host, examine persistent storage in /tmp/chip_kvs text file"); + 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 19: { + LogStep(19, "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; + value.fabricIndex = TH2FabricIndex; + return SendCommand(kIdentityAlpha, GetEndpoint(0), OperationalCredentials::Id, + OperationalCredentials::Commands::RemoveFabric::Id, value, chip::Optional(10000), + chip::NullOptional + + ); + } + case 20: { + LogStep(20, "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; + + { + auto * listHolder_0 = + new ListHolder(2); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].privilege = + static_cast(5); + listHolder_0->mList[0].authMode = + static_cast(2); + listHolder_0->mList[0].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(2); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = mTH1CommissionerNodeId.HasValue() ? mTH1CommissionerNodeId.Value() : 112233ULL; + listHolder_3->mList[1] = 1111ULL; + listHolder_0->mList[0].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 2); + } + listHolder_0->mList[0].targets.SetNull(); + listHolder_0->mList[0].fabricIndex = TH1FabricIndex; + + listHolder_0->mList[1].privilege = + static_cast(3); + listHolder_0->mList[1].authMode = + static_cast(3); + listHolder_0->mList[1].subjects.SetNonNull(); + + { + auto * listHolder_3 = new ListHolder(1); + listFreer.add(listHolder_3); + listHolder_3->mList[0] = 3333ULL; + listHolder_0->mList[1].subjects.Value() = chip::app::DataModel::List(listHolder_3->mList, 1); + } + listHolder_0->mList[1].targets.SetNull(); + listHolder_0->mList[1].fabricIndex = TH1FabricIndex; + + value = chip::app::DataModel::List( + listHolder_0->mList, 2); + } + return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, + chip::NullOptional, chip::NullOptional); + } + case 21: { + LogStep(21, + "Step 17:TH1 reads DUT Endpoint 0 AccessControl cluster Extension attribute, value is list of " + "AccessControlExtensionStruct containing 1 element"); + VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Extension::Id, true, + chip::NullOptional); + } + case 22: { + LogStep(22, "Step 18: If DUT is an app on host, examine persistent storage in /tmp/chip_kvs text file"); + 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_1_1Suite : public TestCommand +{ +public: + Test_TC_BOOL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BOOL_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_BOOL_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 + { + + // Allow yaml to access the current commissioner node id. + // Default to 0 (undefined node id) so we know if this isn't + // set correctly. + // Reset on every step in case it changed. + chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); + (void) commissionerNodeId; + + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("clusterRevision", value, 1U)); + VerifyOrReturn(CheckConstraintType("value", "int16u", "int16u")); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint32_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("featureMap", value, 0UL)); + VerifyOrReturn(CheckConstraintType("value", "bitmap32", "bitmap32")); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65528UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65529UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65531UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65532UL)); + VerifyOrReturn(CheckConstraintContains("value", value, 65533UL)); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("acceptedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + { + auto iter_0 = value.begin(); + VerifyOrReturn(CheckNoMoreListItems("generatedCommandList", iter_0, 0)); + } + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + } + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + // Allow yaml to access the current commissioner node id. + // Default to 0 (undefined node id) so we know if this isn't + // set correctly. + // Reset on every step in case it changed. + chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); + (void) commissionerNodeId; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "read the global attribute: ClusterRevision"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, BooleanState::Attributes::ClusterRevision::Id, + true, chip::NullOptional); + } + case 2: { + LogStep(2, "Read the global attribute: FeatureMap"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, BooleanState::Attributes::FeatureMap::Id, true, + chip::NullOptional); + } + case 3: { + LogStep(3, "Read the global attribute: AttributeList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, BooleanState::Attributes::AttributeList::Id, + true, chip::NullOptional); + } + case 4: { + LogStep(4, "Read the global attribute: AcceptedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, + BooleanState::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); + } + case 5: { + LogStep(5, "Read the global attribute: GeneratedCommandList"); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), BooleanState::Id, + BooleanState::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); + } + } + return CHIP_NO_ERROR; + } +}; + +class Test_TC_BOOL_2_1Suite : public TestCommand +{ +public: + Test_TC_BOOL_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BOOL_2_1", 2, credsIssuerConfig) + { + AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); + AddArgument("cluster", &mCluster); + AddArgument("endpoint", 0, UINT16_MAX, &mEndpoint); + AddArgument("timeout", 0, UINT16_MAX, &mTimeout); + } + + ~Test_TC_BOOL_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 + { + + // Allow yaml to access the current commissioner node id. + // Default to 0 (undefined node id) so we know if this isn't + // set correctly. + // Reset on every step in case it changed. + chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); + (void) commissionerNodeId; + + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + bool value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "boolean", "boolean")); } break; default: @@ -115356,236 +115952,56 @@ class Test_TC_TMP_2_2Suite : public TestCommand switch (mTestIndex - 1) { - case 0: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 1: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32766)); - } - break; - case 2: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27314)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); - } - break; - case 3: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27314)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); - valueBeforeChange = value; - } - break; - case 4: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 5: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::Nullable value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); - VerifyOrReturn(CheckConstraintMinValue("value", value, -27314)); - VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); - VerifyOrReturn(CheckConstraintNotValue("value", value, valueBeforeChange)); - } - break; - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - // Allow yaml to access the current commissioner node id. - // Default to 0 (undefined node id) so we know if this isn't - // set correctly. - // Reset on every step in case it changed. - chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); - (void) commissionerNodeId; - switch (testIndex) - { - case 0: { - LogStep(0, "Wait for the commissioned device to be retrieved"); - ListFreer listFreer; - chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; - value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; - return WaitForCommissionee(kIdentityAlpha, value); - } - case 1: { - LogStep(1, "Read the mandatory attribute: MinMeasuredValue"); - VerifyOrDo(!ShouldSkip("TMP.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::MinMeasuredValue::Id, true, chip::NullOptional); - } - case 2: { - LogStep(2, "Read the mandatory attribute: MaxMeasuredValue"); - VerifyOrDo(!ShouldSkip("TMP.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); - } - case 3: { - LogStep(3, "Reads MeasuredValue attribute from DUT"); - VerifyOrDo(!ShouldSkip("TMP.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); - } - case 4: { - LogStep(4, "Operate on device to change the temperature significantly"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TMP.M.ManuallyControlled"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 5: { - LogStep(5, "Read the mandatory attribute: MeasuredValue"); - VerifyOrDo(!ShouldSkip("TMP.S.A0000 && TMP.M.ManuallyControlled"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, - TemperatureMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); - } - } - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TMP_3_1Suite : public TestCommand -{ -public: - Test_TC_TMP_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TMP_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_TMP_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 - { - - // Allow yaml to access the current commissioner node id. - // Default to 0 (undefined node id) so we know if this isn't - // set correctly. - // Reset on every step in case it changed. - chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); - (void) commissionerNodeId; - - bool shouldContinue = false; - - switch (mTestIndex - 1) - { - default: - LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); - } - - if (shouldContinue) - { - ContinueOnChipMainThread(CHIP_NO_ERROR); - } - } - - CHIP_ERROR DoTestStep(uint16_t testIndex) override - { - using namespace chip::app::Clusters; - // Allow yaml to access the current commissioner node id. - // Default to 0 (undefined node id) so we know if this isn't - // set correctly. - // Reset on every step in case it changed. - chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); - (void) commissionerNodeId; - switch (testIndex) - {} - return CHIP_NO_ERROR; - } -}; - -class Test_TC_TSTAT_3_1Suite : public TestCommand -{ -public: - Test_TC_TSTAT_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_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_TSTAT_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 - { - - // Allow yaml to access the current commissioner node id. - // Default to 0 (undefined node id) so we know if this isn't - // set correctly. - // Reset on every step in case it changed. - chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); - (void) commissionerNodeId; - - bool shouldContinue = false; - - switch (mTestIndex - 1) - { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 1: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, -27315)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 32766)); + } + break; + case 2: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, -27314)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); + } + break; + case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, -27314)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); + valueBeforeChange = value; + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::Nullable value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "int16s", "int16s")); + VerifyOrReturn(CheckConstraintMinValue("value", value, -27314)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 32767)); + VerifyOrReturn(CheckConstraintNotValue("value", value, valueBeforeChange)); + } + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -115606,15 +116022,57 @@ class Test_TC_TSTAT_3_1Suite : public TestCommand chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); (void) commissionerNodeId; switch (testIndex) - {} + { + case 0: { + LogStep(0, "Wait for the commissioned device to be retrieved"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; + value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; + return WaitForCommissionee(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "Read the mandatory attribute: MinMeasuredValue"); + VerifyOrDo(!ShouldSkip("TMP.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, + TemperatureMeasurement::Attributes::MinMeasuredValue::Id, true, chip::NullOptional); + } + case 2: { + LogStep(2, "Read the mandatory attribute: MaxMeasuredValue"); + VerifyOrDo(!ShouldSkip("TMP.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, + TemperatureMeasurement::Attributes::MaxMeasuredValue::Id, true, chip::NullOptional); + } + case 3: { + LogStep(3, "Reads MeasuredValue attribute from DUT"); + VerifyOrDo(!ShouldSkip("TMP.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, + TemperatureMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "Operate on device to change the temperature significantly"); + VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && TMP.M.ManuallyControlled"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 5: { + LogStep(5, "Read the mandatory attribute: MeasuredValue"); + VerifyOrDo(!ShouldSkip("TMP.S.A0000 && TMP.M.ManuallyControlled"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), TemperatureMeasurement::Id, + TemperatureMeasurement::Attributes::MeasuredValue::Id, true, chip::NullOptional); + } + } return CHIP_NO_ERROR; } }; -class Test_TC_TSTAT_3_2Suite : public TestCommand +class Test_TC_TMP_3_1Suite : public TestCommand { public: - Test_TC_TSTAT_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_3_2", 0, credsIssuerConfig) + Test_TC_TMP_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TMP_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -115622,7 +116080,7 @@ class Test_TC_TSTAT_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_TSTAT_3_2Suite() {} + ~Test_TC_TMP_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -115680,10 +116138,10 @@ class Test_TC_TSTAT_3_2Suite : public TestCommand } }; -class Test_TC_TSUIC_3_1Suite : public TestCommand +class Test_TC_TSTAT_3_1Suite : public TestCommand { public: - Test_TC_TSUIC_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSUIC_3_1", 0, credsIssuerConfig) + Test_TC_TSTAT_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -115691,7 +116149,7 @@ class Test_TC_TSUIC_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_TSUIC_3_1Suite() {} + ~Test_TC_TSTAT_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -115749,11 +116207,10 @@ class Test_TC_TSUIC_3_1Suite : public TestCommand } }; -class Test_TC_DGTHREAD_2_5Suite : public TestCommand +class Test_TC_TSTAT_3_2Suite : public TestCommand { public: - Test_TC_DGTHREAD_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DGTHREAD_2_5", 0, credsIssuerConfig) + Test_TC_TSTAT_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSTAT_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -115761,7 +116218,7 @@ class Test_TC_DGTHREAD_2_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGTHREAD_2_5Suite() {} + ~Test_TC_TSTAT_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -115819,11 +116276,10 @@ class Test_TC_DGTHREAD_2_5Suite : public TestCommand } }; -class Test_TC_DGTHREAD_3_1Suite : public TestCommand +class Test_TC_TSUIC_3_1Suite : public TestCommand { public: - Test_TC_DGTHREAD_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DGTHREAD_3_1", 0, credsIssuerConfig) + Test_TC_TSUIC_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_TSUIC_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -115831,7 +116287,7 @@ class Test_TC_DGTHREAD_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGTHREAD_3_1Suite() {} + ~Test_TC_TSUIC_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -115889,11 +116345,11 @@ class Test_TC_DGTHREAD_3_1Suite : public TestCommand } }; -class Test_TC_DGTHREAD_3_2Suite : public TestCommand +class Test_TC_DGTHREAD_2_5Suite : public TestCommand { public: - Test_TC_DGTHREAD_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DGTHREAD_3_2", 0, credsIssuerConfig) + Test_TC_DGTHREAD_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DGTHREAD_2_5", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -115901,7 +116357,7 @@ class Test_TC_DGTHREAD_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGTHREAD_3_2Suite() {} + ~Test_TC_DGTHREAD_2_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -115959,11 +116415,11 @@ class Test_TC_DGTHREAD_3_2Suite : public TestCommand } }; -class Test_TC_DGTHREAD_3_3Suite : public TestCommand +class Test_TC_DGTHREAD_3_1Suite : public TestCommand { public: - Test_TC_DGTHREAD_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DGTHREAD_3_3", 0, credsIssuerConfig) + Test_TC_DGTHREAD_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DGTHREAD_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -115971,7 +116427,7 @@ class Test_TC_DGTHREAD_3_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGTHREAD_3_3Suite() {} + ~Test_TC_DGTHREAD_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -116029,11 +116485,11 @@ class Test_TC_DGTHREAD_3_3Suite : public TestCommand } }; -class Test_TC_DGTHREAD_3_4Suite : public TestCommand +class Test_TC_DGTHREAD_3_2Suite : public TestCommand { public: - Test_TC_DGTHREAD_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DGTHREAD_3_4", 0, credsIssuerConfig) + Test_TC_DGTHREAD_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DGTHREAD_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -116041,7 +116497,7 @@ class Test_TC_DGTHREAD_3_4Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGTHREAD_3_4Suite() {} + ~Test_TC_DGTHREAD_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -116099,11 +116555,11 @@ class Test_TC_DGTHREAD_3_4Suite : public TestCommand } }; -class Test_TC_DGTHREAD_3_5Suite : public TestCommand +class Test_TC_DGTHREAD_3_3Suite : public TestCommand { public: - Test_TC_DGTHREAD_3_5Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_DGTHREAD_3_5", 0, credsIssuerConfig) + Test_TC_DGTHREAD_3_3Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DGTHREAD_3_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -116111,7 +116567,7 @@ class Test_TC_DGTHREAD_3_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_DGTHREAD_3_5Suite() {} + ~Test_TC_DGTHREAD_3_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -116169,10 +116625,11 @@ class Test_TC_DGTHREAD_3_5Suite : public TestCommand } }; -class Test_TC_ACT_2_1Suite : public TestCommand +class Test_TC_DGTHREAD_3_4Suite : public TestCommand { public: - Test_TC_ACT_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_2_1", 0, credsIssuerConfig) + Test_TC_DGTHREAD_3_4Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DGTHREAD_3_4", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -116180,7 +116637,7 @@ class Test_TC_ACT_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ACT_2_1Suite() {} + ~Test_TC_DGTHREAD_3_4Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -116238,10 +116695,11 @@ class Test_TC_ACT_2_1Suite : public TestCommand } }; -class Test_TC_ACT_2_2Suite : public TestCommand +class Test_TC_DGTHREAD_3_5Suite : public TestCommand { public: - Test_TC_ACT_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_2_2", 0, credsIssuerConfig) + Test_TC_DGTHREAD_3_5Suite(CredentialIssuerCommands * credsIssuerConfig) : + TestCommand("Test_TC_DGTHREAD_3_5", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -116249,7 +116707,7 @@ class Test_TC_ACT_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ACT_2_2Suite() {} + ~Test_TC_DGTHREAD_3_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -116307,10 +116765,10 @@ class Test_TC_ACT_2_2Suite : public TestCommand } }; -class Test_TC_ACT_3_2Suite : public TestCommand +class Test_TC_ACT_2_1Suite : public TestCommand { public: - Test_TC_ACT_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_3_2", 0, credsIssuerConfig) + Test_TC_ACT_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -116318,7 +116776,7 @@ class Test_TC_ACT_3_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ACT_3_2Suite() {} + ~Test_TC_ACT_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -116376,10 +116834,10 @@ class Test_TC_ACT_3_2Suite : public TestCommand } }; -class Test_TC_LTIME_1_1Suite : public TestCommand +class Test_TC_ACT_2_2Suite : public TestCommand { public: - Test_TC_LTIME_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_1_1", 0, credsIssuerConfig) + Test_TC_ACT_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -116387,7 +116845,7 @@ class Test_TC_LTIME_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_LTIME_1_1Suite() {} + ~Test_TC_ACT_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -116445,10 +116903,10 @@ class Test_TC_LTIME_1_1Suite : public TestCommand } }; -class Test_TC_LTIME_2_1Suite : public TestCommand +class Test_TC_ACT_3_2Suite : public TestCommand { public: - Test_TC_LTIME_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_2_1", 0, credsIssuerConfig) + Test_TC_ACT_3_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACT_3_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -116456,7 +116914,7 @@ class Test_TC_LTIME_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_LTIME_2_1Suite() {} + ~Test_TC_ACT_3_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -116514,10 +116972,10 @@ class Test_TC_LTIME_2_1Suite : public TestCommand } }; -class Test_TC_LTIME_3_1Suite : public TestCommand +class Test_TC_LTIME_2_1Suite : public TestCommand { public: - Test_TC_LTIME_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_3_1", 0, credsIssuerConfig) + Test_TC_LTIME_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -116525,7 +116983,7 @@ class Test_TC_LTIME_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_LTIME_3_1Suite() {} + ~Test_TC_LTIME_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -116583,10 +117041,10 @@ class Test_TC_LTIME_3_1Suite : public TestCommand } }; -class Test_TC_BIND_2_1Suite : public TestCommand +class Test_TC_LTIME_3_1Suite : public TestCommand { public: - Test_TC_BIND_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BIND_2_1", 0, credsIssuerConfig) + Test_TC_LTIME_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_LTIME_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -116594,7 +117052,7 @@ class Test_TC_BIND_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BIND_2_1Suite() {} + ~Test_TC_LTIME_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -116652,10 +117110,10 @@ class Test_TC_BIND_2_1Suite : public TestCommand } }; -class Test_TC_BIND_2_2Suite : public TestCommand +class Test_TC_BIND_2_1Suite : public TestCommand { public: - Test_TC_BIND_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BIND_2_2", 0, credsIssuerConfig) + Test_TC_BIND_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BIND_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -116663,7 +117121,7 @@ class Test_TC_BIND_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BIND_2_2Suite() {} + ~Test_TC_BIND_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -116721,10 +117179,10 @@ class Test_TC_BIND_2_2Suite : public TestCommand } }; -class Test_TC_BIND_2_3Suite : public TestCommand +class Test_TC_BIND_2_2Suite : public TestCommand { public: - Test_TC_BIND_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BIND_2_3", 0, credsIssuerConfig) + Test_TC_BIND_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BIND_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -116732,7 +117190,7 @@ class Test_TC_BIND_2_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_BIND_2_3Suite() {} + ~Test_TC_BIND_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -116790,10 +117248,10 @@ class Test_TC_BIND_2_3Suite : public TestCommand } }; -class Test_TC_S_1_1Suite : public TestCommand +class Test_TC_BIND_2_3Suite : public TestCommand { public: - Test_TC_S_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_1_1", 0, credsIssuerConfig) + Test_TC_BIND_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_BIND_2_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -116801,7 +117259,7 @@ class Test_TC_S_1_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_S_1_1Suite() {} + ~Test_TC_BIND_2_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -116859,10 +117317,10 @@ class Test_TC_S_1_1Suite : public TestCommand } }; -class Test_TC_S_2_1Suite : public TestCommand +class Test_TC_S_1_1Suite : public TestCommand { public: - Test_TC_S_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_2_1", 0, credsIssuerConfig) + Test_TC_S_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_1_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -116870,7 +117328,7 @@ class Test_TC_S_2_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_S_2_1Suite() {} + ~Test_TC_S_1_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -116928,10 +117386,10 @@ class Test_TC_S_2_1Suite : public TestCommand } }; -class Test_TC_S_2_2Suite : public TestCommand +class Test_TC_S_2_1Suite : public TestCommand { public: - Test_TC_S_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_2_2", 0, credsIssuerConfig) + Test_TC_S_2_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_2_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -116939,7 +117397,7 @@ class Test_TC_S_2_2Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_S_2_2Suite() {} + ~Test_TC_S_2_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -116997,10 +117455,10 @@ class Test_TC_S_2_2Suite : public TestCommand } }; -class Test_TC_S_2_3Suite : public TestCommand +class Test_TC_S_2_2Suite : public TestCommand { public: - Test_TC_S_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_2_3", 0, credsIssuerConfig) + Test_TC_S_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_2_2", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -117008,7 +117466,7 @@ class Test_TC_S_2_3Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_S_2_3Suite() {} + ~Test_TC_S_2_2Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -117066,10 +117524,10 @@ class Test_TC_S_2_3Suite : public TestCommand } }; -class Test_TC_S_3_1Suite : public TestCommand +class Test_TC_S_2_3Suite : public TestCommand { public: - Test_TC_S_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_3_1", 0, credsIssuerConfig) + Test_TC_S_2_3Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_2_3", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -117077,7 +117535,7 @@ class Test_TC_S_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_S_3_1Suite() {} + ~Test_TC_S_2_3Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -117135,10 +117593,10 @@ class Test_TC_S_3_1Suite : public TestCommand } }; -class Test_TC_PCC_3_1Suite : public TestCommand +class Test_TC_S_3_1Suite : public TestCommand { public: - Test_TC_PCC_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PCC_3_1", 0, credsIssuerConfig) + Test_TC_S_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_S_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -117146,7 +117604,7 @@ class Test_TC_PCC_3_1Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_PCC_3_1Suite() {} + ~Test_TC_S_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -117204,10 +117662,10 @@ class Test_TC_PCC_3_1Suite : public TestCommand } }; -class Test_TC_ACL_2_5Suite : public TestCommand +class Test_TC_PCC_3_1Suite : public TestCommand { public: - Test_TC_ACL_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_5", 0, credsIssuerConfig) + Test_TC_PCC_3_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_PCC_3_1", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -117215,7 +117673,7 @@ class Test_TC_ACL_2_5Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ACL_2_5Suite() {} + ~Test_TC_PCC_3_1Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -117273,10 +117731,10 @@ class Test_TC_ACL_2_5Suite : public TestCommand } }; -class Test_TC_ACL_2_6Suite : public TestCommand +class Test_TC_ACL_2_5Suite : public TestCommand { public: - Test_TC_ACL_2_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_6", 0, credsIssuerConfig) + Test_TC_ACL_2_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_5", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -117284,7 +117742,7 @@ class Test_TC_ACL_2_6Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ACL_2_6Suite() {} + ~Test_TC_ACL_2_5Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -117342,10 +117800,10 @@ class Test_TC_ACL_2_6Suite : public TestCommand } }; -class Test_TC_ACL_2_10Suite : public TestCommand +class Test_TC_ACL_2_6Suite : public TestCommand { public: - Test_TC_ACL_2_10Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_10", 0, credsIssuerConfig) + Test_TC_ACL_2_6Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_2_6", 0, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -117353,7 +117811,7 @@ class Test_TC_ACL_2_10Suite : public TestCommand AddArgument("timeout", 0, UINT16_MAX, &mTimeout); } - ~Test_TC_ACL_2_10Suite() {} + ~Test_TC_ACL_2_6Suite() {} chip::System::Clock::Timeout GetWaitDuration() const override { @@ -117708,6 +118166,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), @@ -118195,7 +118654,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), @@ -118209,7 +118667,6 @@ void registerCommandsTests(Commands & commands, CredentialIssuerCommands * creds make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), - make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), make_unique(credsIssuerConfig), diff --git a/zzz_generated/placeholder/app1/zap-generated/test/Commands.h b/zzz_generated/placeholder/app1/zap-generated/test/Commands.h index a59e5b40c62bbe..2cc8f1f37ee3a8 100644 --- a/zzz_generated/placeholder/app1/zap-generated/test/Commands.h +++ b/zzz_generated/placeholder/app1/zap-generated/test/Commands.h @@ -2421,6 +2421,109 @@ class Test_TC_FLABEL_3_1_SimulatedSuite : public TestCommand } }; +class Test_TC_LTIME_1_1_SimulatedSuite : public TestCommand +{ +public: + Test_TC_LTIME_1_1_SimulatedSuite() : TestCommand("Test_TC_LTIME_1_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_LTIME_1_1_SimulatedSuite() {} + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + + // Allow yaml to access the current commissioner node id. + // Default to 0 (undefined node id) so we know if this isn't + // set correctly. + // Reset on every step in case it changed. + chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); + (void) commissionerNodeId; + + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + // Allow yaml to access the current commissioner node id. + // Default to 0 (undefined node id) so we know if this isn't + // set correctly. + // Reset on every step in case it changed. + chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); + (void) commissionerNodeId; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the device to be commissioned"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type value; + return WaitForCommissioning(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "DUT read (0xFFFD) ClusterRevision attribute"); + VerifyOrDo(!ShouldSkip("LTIME.C.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), TimeFormatLocalization::Id, + TimeFormatLocalization::Attributes::ClusterRevision::Id); + } + case 2: { + LogStep(2, "DUT read (0xFFFC) FeatureMap attribute"); + VerifyOrDo(!ShouldSkip("LTIME.C.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), TimeFormatLocalization::Id, TimeFormatLocalization::Attributes::FeatureMap::Id); + } + case 3: { + LogStep(3, "DUT read (0xFFFB) AttributeList attribute"); + VerifyOrDo(!ShouldSkip("LTIME.C.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), TimeFormatLocalization::Id, TimeFormatLocalization::Attributes::AttributeList::Id); + } + case 4: { + LogStep(4, "DUT read (0xFFF9) AcceptedCommandList attribute"); + VerifyOrDo(!ShouldSkip("LTIME.C.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), TimeFormatLocalization::Id, + TimeFormatLocalization::Attributes::AcceptedCommandList::Id); + } + case 5: { + LogStep(5, "DUT read (0xFFF8) GeneratedCommandList attribute"); + VerifyOrDo(!ShouldSkip("LTIME.C.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), TimeFormatLocalization::Id, + TimeFormatLocalization::Attributes::GeneratedCommandList::Id); + } + } + return CHIP_NO_ERROR; + } +}; + std::unique_ptr GetTestCommand(std::string testName) { if (testName == "Test_TC_BINFO_2_3_Simulated") @@ -2515,6 +2618,10 @@ std::unique_ptr GetTestCommand(std::string testName) { return std::unique_ptr(new Test_TC_FLABEL_3_1_SimulatedSuite()); } + if (testName == "Test_TC_LTIME_1_1_Simulated") + { + return std::unique_ptr(new Test_TC_LTIME_1_1_SimulatedSuite()); + } return nullptr; } @@ -2545,4 +2652,5 @@ void PrintTestCommands() ChipLogError(chipTool, "\t* Test_TC_OCC_2_4_Simulated"); ChipLogError(chipTool, "\t* Test_TC_ULABEL_3_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_FLABEL_3_1_Simulated"); + ChipLogError(chipTool, "\t* Test_TC_LTIME_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 a59e5b40c62bbe..2cc8f1f37ee3a8 100644 --- a/zzz_generated/placeholder/app2/zap-generated/test/Commands.h +++ b/zzz_generated/placeholder/app2/zap-generated/test/Commands.h @@ -2421,6 +2421,109 @@ class Test_TC_FLABEL_3_1_SimulatedSuite : public TestCommand } }; +class Test_TC_LTIME_1_1_SimulatedSuite : public TestCommand +{ +public: + Test_TC_LTIME_1_1_SimulatedSuite() : TestCommand("Test_TC_LTIME_1_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_LTIME_1_1_SimulatedSuite() {} + +private: + chip::Optional mNodeId; + chip::Optional mCluster; + chip::Optional mEndpoint; + chip::Optional mTimeout; + + chip::EndpointId GetEndpoint(chip::EndpointId endpoint) { return mEndpoint.HasValue() ? mEndpoint.Value() : endpoint; } + + // + // Tests methods + // + + void OnResponse(const chip::app::StatusIB & status, chip::TLV::TLVReader * data) override + { + + // Allow yaml to access the current commissioner node id. + // Default to 0 (undefined node id) so we know if this isn't + // set correctly. + // Reset on every step in case it changed. + chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); + (void) commissionerNodeId; + + bool shouldContinue = false; + + switch (mTestIndex - 1) + { + case 0: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + default: + LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); + } + + if (shouldContinue) + { + ContinueOnChipMainThread(CHIP_NO_ERROR); + } + } + + CHIP_ERROR DoTestStep(uint16_t testIndex) override + { + using namespace chip::app::Clusters; + // Allow yaml to access the current commissioner node id. + // Default to 0 (undefined node id) so we know if this isn't + // set correctly. + // Reset on every step in case it changed. + chip::NodeId commissionerNodeId = mCommissionerNodeId.ValueOr(0); + (void) commissionerNodeId; + switch (testIndex) + { + case 0: { + LogStep(0, "Wait for the device to be commissioned"); + ListFreer listFreer; + chip::app::Clusters::DelayCommands::Commands::WaitForCommissioning::Type value; + return WaitForCommissioning(kIdentityAlpha, value); + } + case 1: { + LogStep(1, "DUT read (0xFFFD) ClusterRevision attribute"); + VerifyOrDo(!ShouldSkip("LTIME.C.Afffd"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), TimeFormatLocalization::Id, + TimeFormatLocalization::Attributes::ClusterRevision::Id); + } + case 2: { + LogStep(2, "DUT read (0xFFFC) FeatureMap attribute"); + VerifyOrDo(!ShouldSkip("LTIME.C.Afffc"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), TimeFormatLocalization::Id, TimeFormatLocalization::Attributes::FeatureMap::Id); + } + case 3: { + LogStep(3, "DUT read (0xFFFB) AttributeList attribute"); + VerifyOrDo(!ShouldSkip("LTIME.C.Afffb"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), TimeFormatLocalization::Id, TimeFormatLocalization::Attributes::AttributeList::Id); + } + case 4: { + LogStep(4, "DUT read (0xFFF9) AcceptedCommandList attribute"); + VerifyOrDo(!ShouldSkip("LTIME.C.Afff9"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), TimeFormatLocalization::Id, + TimeFormatLocalization::Attributes::AcceptedCommandList::Id); + } + case 5: { + LogStep(5, "DUT read (0xFFF8) GeneratedCommandList attribute"); + VerifyOrDo(!ShouldSkip("LTIME.C.Afff8"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return WaitAttribute(GetEndpoint(0), TimeFormatLocalization::Id, + TimeFormatLocalization::Attributes::GeneratedCommandList::Id); + } + } + return CHIP_NO_ERROR; + } +}; + std::unique_ptr GetTestCommand(std::string testName) { if (testName == "Test_TC_BINFO_2_3_Simulated") @@ -2515,6 +2618,10 @@ std::unique_ptr GetTestCommand(std::string testName) { return std::unique_ptr(new Test_TC_FLABEL_3_1_SimulatedSuite()); } + if (testName == "Test_TC_LTIME_1_1_Simulated") + { + return std::unique_ptr(new Test_TC_LTIME_1_1_SimulatedSuite()); + } return nullptr; } @@ -2545,4 +2652,5 @@ void PrintTestCommands() ChipLogError(chipTool, "\t* Test_TC_OCC_2_4_Simulated"); ChipLogError(chipTool, "\t* Test_TC_ULABEL_3_1_Simulated"); ChipLogError(chipTool, "\t* Test_TC_FLABEL_3_1_Simulated"); + ChipLogError(chipTool, "\t* Test_TC_LTIME_1_1_Simulated"); }