From 8140dd303b20d113be589d26f4f38d851e8df845 Mon Sep 17 00:00:00 2001 From: manjunath-grl <102359958+manjunath-grl@users.noreply.github.com> Date: Fri, 26 Aug 2022 11:38:20 +0530 Subject: [PATCH] Modified tests Aug 25 (#22152) * Modified test TC-ACL-1.1 TC-DA-1.1 TC-DA-1.2 TC-DA-1.3 TC-DGSW-2.3 TC-DRLK-2.2 TC-MEDIAPLAYBACK-6.3 * Auto generated files * Restyled by whitespace * Modified LVL tests * Auto generated files Co-authored-by: Restyled.io --- src/app/tests/suites/certification/PICS.yaml | 9 +- .../suites/certification/Test_TC_ACL_1_1.yaml | 11 +- .../suites/certification/Test_TC_DA_1_1.yaml | 24 +- .../suites/certification/Test_TC_DA_1_2.yaml | 126 +++++- .../suites/certification/Test_TC_DA_1_3.yaml | 11 +- .../certification/Test_TC_DGSW_2_3.yaml | 2 +- .../certification/Test_TC_DRLK_2_2.yaml | 162 +++---- .../suites/certification/Test_TC_LVL_3_1.yaml | 4 - .../suites/certification/Test_TC_LVL_5_1.yaml | 4 - .../Test_TC_MEDIAPLAYBACK_6_3.yaml | 28 +- .../tests/suites/certification/ci-pics-values | 1 + .../chip-tool/zap-generated/test/Commands.h | 230 +++++----- .../zap-generated/test/Commands.h | 414 ++++++++---------- 13 files changed, 507 insertions(+), 519 deletions(-) diff --git a/src/app/tests/suites/certification/PICS.yaml b/src/app/tests/suites/certification/PICS.yaml index 30c05e81759d8d..c36054278ea4a6 100644 --- a/src/app/tests/suites/certification/PICS.yaml +++ b/src/app/tests/suites/certification/PICS.yaml @@ -5157,12 +5157,6 @@ PICS: - label: "Does the Controller DUT support Service Advertising?" id: MCORE.SC.ADV - - label: "Does the DUT(Client) implement sending Keysetwrite Command?" - id: GRPKEY.C.C00.Tx - - - label: "Does the DUT(Client) support the GroupKeyMap attribute?" - id: GRPKEY.C.A0000 - #133.1. Bridged Device Basic Information Cluster - label: "Does the DUT(server) support the DataModelRevision attribute?" id: BRBINFO.S.A0000 @@ -5564,3 +5558,6 @@ PICS: "Is the device a Client and supports subscribing for multiple attribute" id: MCORE.IDM.C.SubscribeRequest.MultipleAttributes + + - label: "Does the device support the Factory Reset Method?" + id: MCORE.UI.FACTORYRESET diff --git a/src/app/tests/suites/certification/Test_TC_ACL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_ACL_1_1.yaml index 95ac110e222ffa..ed79c6ef263ded 100644 --- a/src/app/tests/suites/certification/Test_TC_ACL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACL_1_1.yaml @@ -53,7 +53,16 @@ tests: response: constraints: type: list - contains: [0, 1, 2, 3, 4, 65528, 65529, 65531, 65532, 65533] + contains: [0, 2, 3, 4, 65528, 65529, 65531, 65532, 65533] + + - label: "TH reads optional attribute (Extension) in AttributeList" + PICS: ACL.S.A0001 + command: "readAttribute" + attribute: "AttributeList" + response: + constraints: + type: list + contains: [1] - label: "TH reads AcceptedCommandList attribute from DUT" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_DA_1_1.yaml b/src/app/tests/suites/certification/Test_TC_DA_1_1.yaml index 17004ee5e47712..486bdf4bc9a00f 100644 --- a/src/app/tests/suites/certification/Test_TC_DA_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DA_1_1.yaml @@ -78,6 +78,7 @@ tests: - label: "Factory reset DUT Perform the device discovery flow checks as covered in TC-DD-2.2" + PICS: MCORE.UI.FACTORYRESET verification: | 1. TH starts matter announcement procedure using BLE transport : verify this by sending "./chip-tool discover commissionables" after launching all-clusters-app on DUT @@ -90,31 +91,20 @@ tests: - label: "Commission DUT to TH2s Fabric" verification: | - To commission DUT to TH2 follow below procedure - 1../chip-tool pairing open-commissioning-window 1 1 400 2000 3840 on TH - - Verify manual parin code on TH1 (chip-tool) Log: - CHIP:IN: Sending encrypted msg 0xaaaad3464d10 with MessageCounter:0 to 0x0000000000000001 at monotonic time: 5805157 msec - [1635691999.946536][3822:3827] CHIP:DMG: ICR moving to [CommandSen] - [1635691999.946586][3822:3827] CHIP:CTL: Manual pairing code: [35407541839] - [1635691999.946650][3822:3827] CHIP:CTL: SetupQRCode: [MT:00000CQM00G6V851H10] - [1635691999.946802][3822:3827] CHIP:EM: Sending Standalone Ack for MessageCounter:3234931243 on exchange 35324i - [1635691999.946850][3822:3827] CHIP:IN: Prepared plaintext message 0xffffaa58a960 to 0x0000000000000000 of type 0x10 and protocolId (0, 0) on exchange 35324i with MessageCounter:1726016118. - [1635691999.946895][3822:3827] CHIP:IN: Sending plaintext msg 0xffffaa58a960 with MessageCounter:1726016118 to 0x0000000000000000 at monotonic time: 5805158 msec - [1635691999.946983][3822:3827] CHIP:EM: Flushed pending ack for MessageCounter:3234931243 on exchange 35324i + sudo ./chip-all-clusters-app --wifi + ./chip-tool pairing ble-wifi 2 zigbeehome matter123 20202021 3841 --trace_decode 1 - 2. Verify TH2 is commissioned by using "./chip-tool pairing code 2 36199720672" considering 36199720672 as manualcode generated in TH1 + Verify in TH2 log: - Verify whether you got below message on TH2 (chip-tool) log - Device commissioning completed with success + [1650455358.501816][4366:4371] CHIP:TOO: Device commissioning completed with success disabled: true - label: "TH2 does a non-fabric-filtered read of Fabrics attribute list from DUT" verification: | - ./chip-tool operationalcredentials read fabrics 2 0 + ./chip-tool operationalcredentials read fabrics 2 0 --commissioner-name beta Verify there is single entry and FabricID matches the FabricID of TH2 on TH2 (chip-tool) log @@ -133,7 +123,7 @@ tests: - label: "TH2 does a non-fabric-filtered read of NOCs attribute list from DUT" verification: | - ./chip-tool operationalcredentials read nocs 2 0 + ./chip-tool operationalcredentials read nocs 2 0 --commissioner-name beta Verify there is single entry on TH2 (chip-tool) log diff --git a/src/app/tests/suites/certification/Test_TC_DA_1_2.yaml b/src/app/tests/suites/certification/Test_TC_DA_1_2.yaml index bec42cb3f42cbb..81cadd47d012eb 100644 --- a/src/app/tests/suites/certification/Test_TC_DA_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DA_1_2.yaml @@ -26,6 +26,11 @@ config: endpoint: 0 tests: + - label: "Pre-Conditions" + verification: | + PAA certificates were obtained externally + disabled: true + - label: "TH1 generates 32-byte AttestationNonce" verification: | To generate the Attestation Nonce give below command @@ -186,11 +191,34 @@ tests: CertificateChainResponse: { [1657814457.685538][2491:2496] CHIP:TOO: certificate: 308201E73082018EA003020102020869CDF10DE9E54ED1300A06082A8648CE3D040302303D3125302306035504030C1C4D6174746572204465762050414920307846464631206E6F2050494431143012060A2B0601040182A27C02010C04464646313020170D3232303230353030303030305A180F39393939313233313233353935395A30533125302306035504030C1C4D61747465722044657620444143203078464646312F30783830303131143012060A2B0601040182A27C02010C044646463131143012060A2B0601040182A27C02020C04383030313059301306072A8648CE3D020106082A8648CE3D03010703420004463AC69342910A0E5588FC6FF56BB63E62ECCECB148F7D4EB03EE552601415767D16A5C663F793E49123260B8297A7CD7E7CFC7B316B39D98E90D29377738E82A360305E300C0603551D130101FF04023000300E0603551D0F0101FF040403020780301D0603551D0E0416041488DDE7B300382932CFF734C04624810F44168A6F301F0603551D2304183016801463540E47F64B1C38D13884A462D16C195D8FFB3C300A06082A8648CE3D040302 [1657814457.685600][2491:2496] CHIP:TOO: ...........: 034700304402200127A27B4B44610EE2FCDC4D2B7885563660BC0F76F17219ED6A08DFB2B3C1CD02206B59E0AF45F3EB2A85B919D35731528C6028C415239545E108E4E54E70971353 + + The log has certificate details (starting with ---BEGIN CERTIFICATE and ending with ---END CERTIFICATE ) as highlighted below, save the certificate in .pem file format. Open editor on your TH , save that in file , example: dac.pem + + 1660951953700] [17233:5262446] CHIP: [DMG] data = 0068e9001f1f110e4f813e5e997100f2b1c69eb72b23bd4e69002a0485ecc741a33706d82f20c8ea99d6b830b2f60ed69c07cecba48142c7f3c8ded67e9ed878b5d68fe28facaf111ee3ce4510fc9b00ad13d57c2a7bd8bdcf868ca8e0aa0bb96c873862f32f12a32207a22e33fe3d8124435207df4f5747414a21b9674685a486f0d3c0aae5d96ba2f02067be2221b98415244522a221f570b62c21a83d88a9ee1a085c5a8c8f5d598f7cb168b4b36ca2306a4554a062e058dba25e7058a4e2f9f976fc71e3d6fcdafb40346d74600e033100243c0837f30f2e6fb337582f6a7d122ffc8943bbc17ba447f80fbac538609c9822d0ab95f6c831071a68ccc9cb1e5180f4daf0a1ae16a33ee3ac7d4754d5f6dca657e44f5a1f9405e668ce848132bb62b1fab6f5cd9aa2d4357fd14e516f18f5c158373f21479aef4c290477141e6d1894901a1c88db870fc1fc005be219dce3f708868ba532c657cf98b8d154d569d6f3de7639cdf72cc43af330ddbac0b910a839416e38a8b305a7eb1b069d274c8c31868363615adb08bfe99a4353f34927785acdb8c1619e1d4f8574491a3e77a46e6c5b47bdd722adfcb00937be7f9ba8c53a8188d42795439a435e6f6a26288c9278981dcac442d480ee40397e2a808d4ae55139562111120bd69411ef301d1b6caf3a4793d143c57092d4944ca93e848f553a19145dc6c02a0b68a67ea83b66afd10988737a753ea8d1f49ca534d12590bf7c3fddd0d7d00baf0121c883a743fcd289dab3d2a8e5131bd987 + [1660951953700] [17233:5262446] CHIP: [DMG] buffer_ptr = 140355398986080 + [1660951953700] [17233:5262446] CHIP: [DMG] } + [1660951953700] [17233:5262446] CHIP: [DMG] + [1660951953700] [17233:5262446] CHIP: [DMG] DAC/PAI (491) = + [1660951953700] [17233:5262446] CHIP: [DMG] { + -----BEGIN CERTIFICATE----- + MIIB5zCCAY6gAwIBAgIIac3xDenlTtEwCgYIKoZIzj0EAwIwPTElMCMGA1UEAwwc + TWF0dGVyIERldiBQQUkgMHhGRkYxIG5vIFBJRDEUMBIGCisGAQQBgqJ8AgEMBEZG + RjEwIBcNMjIwMjA1MDAwMDAwWhgPOTk5OTEyMzEyMzU5NTlaMFMxJTAjBgNVBAMM + HE1hdHRlciBEZXYgREFDIDB4RkZGMS8weDgwMDExFDASBgorBgEEAYKifAIBDARG + RkYxMRQwEgYKKwYBBAGConwCAgwEODAwMTBZMBMGByqGSM49AgEGCCqGSM49AwEH + A0IABEY6xpNCkQoOVYj8b/Vrtj5i7M7LFI99TrA+5VJgFBV2fRalxmP3k+SRIyYL + gpenzX58/HsxaznZjpDSk3dzjoKjYDBeMAwGA1UdEwEB/wQCMAAwDgYDVR0PAQH/ + BAQDAgeAMB0GA1UdDgQWBBSI3eezADgpMs/3NMBGJIEPRBaKbzAfBgNVHSMEGDAW + gBRjVA5H9kscONE4hKRi0WwZXY/7PDAKBggqhkjOPQQDAgNHADBEAiABJ6J7S0Rh + DuL83E0reIVWNmC8D3bxchntagjfsrPBzQIga1ngr0Xz6yqFuRnTVzFSjGAoxBUj + lUXhCOTlTnCXE1M= + -----END CERTIFICATE----- + [1660951953700] [17233:5262446] CHIP: [DMG] } disabled: true - label: "TH1 saves DAC certificate" verification: | - Verify the size of certificate is less than or equal to 600 bytes and of type octstr from the above log + Verify the size of certificate is less than or equal to 600 bytes and of type octstr from the above log, You have saved the file already in the above step Example : 308201E73082018EA003020102020869CDF10DE9E54ED1300A06082A8648CE3D040302303D3125302306035504030C1C4D6174746572204465762050414920307846464631206E6F2050494431143012060A2B0601040182A27C02010C04464646313020170D3232303230353030303030305A180F39393939313233313233353935395A30533125302306035504030C1C4D61747465722044657620444143203078464646312F30783830303131143012060A2B0601040182A27C02010C044646463131143012060A2B0601040182A27C02020C04383030313059301306072A8648CE3D020106082A8648CE3D03010703420004463AC69342910A0E5588FC6FF56BB63E62ECCECB148F7D4EB03EE552601415767D16A5C663F793E49123260B8297A7CD7E7CFC7B316B39D98E90D29377738E82A360305E300C0603551D130101FF04023000300E0603551D0F0101FF040403020780301D0603551D0E0416041488DDE7B300382932CFF734C04624810F44168A6F301F0603551D2304183016801463540E47F64B1C38D13884A462D16C195D8FFB3C300A06082A8648CE3D040302 @@ -209,11 +237,36 @@ tests: [1657814533.326158][2501:2506] CHIP:TOO: CertificateChainResponse: { [1657814533.326229][2501:2506] CHIP:TOO: certificate: 308201CB30820171A003020102020856AD8222AD945B64300A06082A8648CE3D04030230303118301606035504030C0F4D617474657220546573742050414131143012060A2B0601040182A27C02010C04464646313020170D3232303230353030303030305A180F39393939313233313233353935395A303D3125302306035504030C1C4D6174746572204465762050414920307846464631206E6F2050494431143012060A2B0601040182A27C02010C04464646313059301306072A8648CE3D020106082A8648CE3D03010703420004419A9315C2173E0C8C876D03CCFC944852647F7FEC5E5082F4059928ECA894C594151309AC631E4CB03392AF684B0BAFB7E65B3B8162C2F52BF931B8E77AAA82A366306430120603551D130101FF040830060101FF020100300E0603551D0F0101FF040403020106301D0603551D0E0416041463540E47F64B1C38D13884A462D16C195D8FFB3C301F0603551D230418301680146AFD22771F511FECBF1641976710DCDC31A1717E300A06082A8648CE3D0403020348003045022100B2EF27F49AE9B50FB91EEAC94C4D0BDBB8D7929C6C [1657814533.326315][2501:2506] CHIP:TOO: ...........: B88FACE529368D12054C0C0220655DC92B86BD909882A6C62177B825D7D05EDBE7C22F9FEA71220E7EA703F891 + + The log has certificate details (starting with ---BEGIN CERTIFICATE and ending with ---END CERTIFICATE ) as highlighted below , save the certificate in .pem file format. Open editor on your TH , save that in file , example: pai.pem + + [1660952198157] [17290:5268348] CHIP: [DMG] Encrypted Payload (531 bytes) = + [1660952198157] [17290:5268348] CHIP: [DMG] { + [1660952198157] [17290:5268348] CHIP: [DMG] data = 001c39000820730541fea9f0e9b148d6c50bdd30d20acef8a0ee67b0458c5fe377d9793092b83e0670ad46770ce44154de4d131731f7065b8329d08be8a280db77f8c12b48300c5fb009c0d3f4b0b1b0a8f4523e319db11ee5d8eb679325c2982248aa5c75b474c50f3bbb0f617ab06a04df403557a564bac4cf08c56fd2eb951d4be875f290dd7b9da01e558fc85ad7b4922d804029410735cae9910a6df282145059b3228e9349467ddc917a268638fa7882a3f7b278355ec848c2ac3f466d3cca746ca416733b85dc6bd8e99ecd35bfc0d3b85f28db6e897636bec89fc41ee2eba78bc7ca11fe959a913ec37901b30a193e6665672e8159e194ca133831251205bca75c00dd8b10160a5b6b814e0cc4fc52f48cc2b68819212bcf71ba11785d2c4628363718e9943216a3f4a3f28adcb988997af982a48d793cd9bd0b62648aa2ffed8f373cd7d5ca86ae703415016adf45a1e8ee26a62d023a6a09accca619ca28e3db15cd4ee5b850608c8319e166dc540877683d960d4b9fde0ae4042096ce696532e9d6b8c96f030def011e59a8762753fc0d50ecf30842377249f78c9b3ee164f5f7988a777a4a1ca407f40923737480eca5e0181977b6048d8835b3d3cedd0d36b9c39098e49048c31db9b48decd744f3121b0260e07b9afe9a8a71d9c14a230e48a1b56894c0453b9779bc8fe269e072ee842aa17821ee09b83cfab5e852918a37bbc1414b7f62cd5dc4c254bfa4 + [1660952198157] [17290:5268348] CHIP: [DMG] buffer_ptr = 140233457951312 + [1660952198157] [17290:5268348] CHIP: [DMG] } + [1660952198157] [17290:5268348] CHIP: [DMG] + [1660952198157] [17290:5268348] CHIP: [DMG] DAC/PAI (463) = + [1660952198157] [17290:5268348] CHIP: [DMG] { + -----BEGIN CERTIFICATE----- + MIIByzCCAXGgAwIBAgIIVq2CIq2UW2QwCgYIKoZIzj0EAwIwMDEYMBYGA1UEAwwP + TWF0dGVyIFRlc3QgUEFBMRQwEgYKKwYBBAGConwCAQwERkZGMTAgFw0yMjAyMDUw + MDAwMDBaGA85OTk5MTIzMTIzNTk1OVowPTElMCMGA1UEAwwcTWF0dGVyIERldiBQ + QUkgMHhGRkYxIG5vIFBJRDEUMBIGCisGAQQBgqJ8AgEMBEZGRjEwWTATBgcqhkjO + PQIBBggqhkjOPQMBBwNCAARBmpMVwhc+DIyHbQPM/JRIUmR/f+xeUIL0BZko7KiU + xZQVEwmsYx5MsDOSr2hLC6+35ls7gWLC9Sv5MbjneqqCo2YwZDASBgNVHRMBAf8E + CDAGAQH/AgEAMA4GA1UdDwEB/wQEAwIBBjAdBgNVHQ4EFgQUY1QOR/ZLHDjROISk + YtFsGV2P+zwwHwYDVR0jBBgwFoAUav0idx9RH+y/FkGXZxDc3DGhcX4wCgYIKoZI + zj0EAwIDSAAwRQIhALLvJ/Sa6bUPuR7qyUxNC9u415KcbLiPrOUpNo0SBUwMAiBl + Xckrhr2QmIKmxiF3uCXX0F7b58Ivn+pxIg5+pwP4kQ== + -----END CERTIFICATE----- + [1660952198157] [17290:5268348] CHIP: [DMG] } + [1660952198157] [17290:5268348] CHIP: [DMG] disabled: true - label: "TH1 saves PAI certificate" verification: | - Verify the size of certificate is less than or equal to 600 bytes and of type octstr from the above log + Verify the size of certificate is less than or equal to 600 bytes and of type octstr from the above log, already saved the file in the above step Example : 308201CB30820171A003020102020856AD8222AD945B64300A06082A8648CE3D04030230303118301606035504030C0F4D617474657220546573742050414131143012060A2B0601040182A27C02010C04464646313020170D3232303230353030303030305A180F39393939313233313233353935395A303D3125302306035504030C1C4D6174746572204465762050414920307846464631206E6F2050494431143012060A2B0601040182A27C02010C04464646313059301306072A8648CE3D020106082A8648CE3D03010703420004419A9315C2173E0C8C876D03CCFC944852647F7FEC5E5082F4059928ECA894C594151309AC631E4CB03392AF684B0BAFB7E65B3B8162C2F52BF931B8E77AAA82A366306430120603551D130101FF040830060101FF020100300E0603551D0F0101FF040403020106301D0603551D0E0416041463540E47F64B1C38D13884A462D16C195D8FFB3C301F0603551D230418301680146AFD22771F511FECBF1641976710DCDC31A1717E300A06082A8648CE3D0403020348003045022100B2EF27F49AE9B50FB91EEAC94C4D0BDBB8D7929C6C @@ -225,7 +278,7 @@ tests: verification: | ./chip-tool basic read vendor-id 1 0 --trace_decode 1 - Verify the vendorId in TH (chip-tool) Log + Verify the vendorId in TH (chip-tool) Log , Note this Vendor ID and you are going to verify this matching with CD in the steps below [1654068802.514300][10990:10995] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0002 DataVersion: 2079473956 [1654068802.514357][10990:10995] CHIP:TOO: VendorID: 65521 @@ -238,7 +291,7 @@ tests: verification: | ./chip-tool basic read product-id 1 0 --trace_decode 1 - Verify ProductId in TH (chip-tool) Log + Verify ProductId in TH (chip-tool) Log, Note this PID and you are going to verify this matching with CD in the steps below [1654068987.385768][11050:11055] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_0028 Attribute 0x0000_0004 DataVersion: 2079473956 [1654068987.385820][11050:11055] CHIP:TOO: ProductID: 32769 @@ -267,7 +320,9 @@ tests: [1658223434.719135][5712:5717] CHIP:TOO: } disabled: true - - label: "" + - label: + "Verify that the DUT generated the AttestationResponse has the + following fields: AttestationElements ,AttestationSignature" verification: | Verify that the DUT generated the AttestationResponse has the following fields in the TH (Chip-Tool ) log generated from the previous step command 1. AttestationElements @@ -685,6 +740,7 @@ tests: version_number should be in range 0..65535, certification_type should be between 1..2 + Verify if the VID PID info in here matches with the steps above [1655374218.453303][35023:35028] CHIP:DMG: Attestation Elements (585 bytes) = [1655374218.453366][35023:35028] CHIP:DMG: { @@ -812,7 +868,7 @@ tests: MCORE.DA.CERTDECL_ORIGIN_VENDORID && MCORE.DA.CERTDECL_ORIGIN_PRODUCTID verification: | - Verify vendor_id and product_id are present in Certification Declaration in TH(chip-tool) log: + Verify dac_origin_vendor_id and dac_origin_product_id are present in Certification Declaration in TH(chip-tool) log: , These are optional parameters, we need not fail the test step if those are not present [1655374218.453303][35023:35028] CHIP:DMG: Attestation Elements (585 bytes) = [1655374218.453366][35023:35028] CHIP:DMG: { @@ -945,11 +1001,12 @@ tests: MCORE.DA.CERTDECL_ORIGIN_VENDORID && MCORE.DA.CERTDECL_ORIGIN_PRODUCTID verification: | - Verify The Vendor ID (VID) in the DAC subject and PAI subject are the same as the vendor_id field in the Certification Declaration. - To decode the DAC/PAI subject, refer TC-DA-1.7 - step 6 & then verify the vendorID and ProductID is same from the previous step log output. - + Print the DAC and PAI that you saved earlier using + openssl x509 -in dac.pem -text + openssl x509 -in pai.pem -text + The output looks like something below. Pls verify if the VID and PIDs mentioned here are matching with information in CD Certificate: Data: Version: 3 (0x2) @@ -1022,7 +1079,12 @@ tests: PAI certificate matches the one found in the authorized_paa_list" PICS: MCORE.DA.CERTDECL_AUTH_PAA verification: | - Not verifiable, authorized_paa_list is optional + The reference applications (all-cluster-app..etc) do not have the authorized_paa_list as it is optional. + + If the authorized_paa_list is available, verify if the PAI chains to PAA using the commands + 1. openssl x509 -in pai.pem -text + 2. openssl x509 -in .pem -text + compare the Authority Key Identifier printed in step1 with the printed in step2. Repeat this to verify on all PAAs. disabled: true - label: @@ -1030,7 +1092,7 @@ tests: verified with the well-known Certification Declaration public key used to originally sign the Certification Declaration" verification: | - Not verifiable, which requires a specific decode tool + Out of scope for V1.0, disabled: true - label: @@ -1065,14 +1127,52 @@ tests: secure session over which the AttestationResponse was obtained, using the subject public key found in the DAC." verification: | - Not verifiable, which requires a specific decode tool to decode the signature & construct a new message. + Out of scope for V1.0, which requires a specific decode tool in chip-cert tool to decode the signature & construct a new message. disabled: true - label: "Verify that the PAA subject public key and subject match one of the official PAA certificates found in the Distributed Compliance Ledger." verification: | - Not verifiable because DCL data + For SVE-2, verify if the PAA subject key matches with the list of PAA stored in the TH. For 1.0 certification, verify the PAA subject matches one of the official PAA certificates found in DCL. To get the PAA subject public key from the test PAA stored in TH, use the command below. For 1.0 cert, Extract the subject public key in similar way and compare if it matches with the certs stored in DCL. + + $openssl x509 -in credentials/development/paa-root-certs/Chip-Test-PAA-FFF1-Cert.pem -text + Certificate: + Data: + Version: 3 (0x2) + Serial Number: 5668035430391749660 (0x4ea8e83182d41c1c) + Signature Algorithm: ecdsa-with-SHA256 + Issuer: CN = Matter Test PAA, 1.3.6.1.4.1.37244.2.1 = FFF1 + Validity + Not Before: Jun 28 14:23:43 2021 GMT + Not After : Dec 31 23:59:59 9999 GMT + Subject: CN = Matter Test PAA, 1.3.6.1.4.1.37244.2.1 = FFF1 + Subject Public Key Info: + Public Key Algorithm: id-ecPublicKey + Public-Key: (256 bit) + pub: + 04:b6:cb:63:72:88:7f:29:28:f5:ba:c8:1a:a9:d9: + 3a:e2:43:1c:ad:a9:d7:9e:24:2f:65:17:7e:f9:ce: + d9:32:a2:8e:cd:03:ba:af:6a:8f:ca:18:4a:1a:50: + 35:42:96:0d:45:3f:30:3f:1f:19:42:1d:75:1e:8f: + 8f:1a:9a:9b:75 + ASN1 OID: prime256v1 + NIST CURVE: P-256 + X509v3 extensions: + X509v3 Basic Constraints: critical + CA:TRUE, pathlen:1 + X509v3 Key Usage: critical + Certificate Sign, CRL Sign + X509v3 Subject Key Identifier: + 6A:FD:22:77:1F:51:1F:EC:BF:16:41:97:67:10:DC:DC:31:A1:71:7E + X509v3 Authority Key Identifier: + keyid:6A:FD:22:77:1F:51:1F:EC:BF:16:41:97:67:10:DC:DC:31:A1:71:7E + + Signature Algorithm: ecdsa-with-SHA256 + 30:44:02:20:50:aa:80:02:f4:d9:32:a9:a0:05:38:f6:53:68: + ad:0f:ff:c8:ef:bb:c9:be:b7:da:56:98:35:cf:9a:a7:51:0e: + 02:20:23:ba:c8:fe:0f:23:e7:54:45:b6:53:39:08:1a:47:99: + 49:29:c7:2a:af:0a:15:48:d4:0d:03:4d:51:4b:25:de disabled: true - label: diff --git a/src/app/tests/suites/certification/Test_TC_DA_1_3.yaml b/src/app/tests/suites/certification/Test_TC_DA_1_3.yaml index 05ce3ac3d23a07..7eff4aa56fa801 100644 --- a/src/app/tests/suites/certification/Test_TC_DA_1_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_DA_1_3.yaml @@ -31,6 +31,13 @@ tests: Chip-tool command used below are an example to verify the DUT as client test cases. For certification test, we expect DUT should have a capability or way to run the equivalent command. disabled: true + - label: "Pre-Conditions" + verification: | + 1. PAI, DAC certificates are obtained and validated against externally obtained PAA certificate + 2. Operations happen within the Fail-Safe Context + 3. TH1 should be known about Commissioner based error condition/warning + disabled: true + - label: "Start the commissioning process of TH1 on DUT" verification: | sudo ./chip-all-clusters-app --wifi --trace_decode 1 @@ -182,7 +189,7 @@ tests: [1659763321.704116][2548:2548] CHIP:DMG: ICR moving to [AwaitingDe]" disabled: true - - label: "" + - label: "Verify that DUT Completes the commissioning process successfully" verification: | Verify that DUT Completes the commissioning process successfully on TH(all-clusters-app) @@ -311,7 +318,7 @@ tests: [1659766925.558805][2548:2548] CHIP:DMG: } disabled: true - - label: "" + - label: "Verify that the Nonce_1 and Nonce_2 are different." verification: | Verify the value of NONCE in step 9 and 3 are different diff --git a/src/app/tests/suites/certification/Test_TC_DGSW_2_3.yaml b/src/app/tests/suites/certification/Test_TC_DGSW_2_3.yaml index 406d02672771c3..b86349da970c7d 100644 --- a/src/app/tests/suites/certification/Test_TC_DGSW_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_DGSW_2_3.yaml @@ -39,7 +39,7 @@ tests: - label: "Reads a list of ThreadMetrics struct attribute from DUT." command: "readAttribute" attribute: "ThreadMetrics" - PICS: DGSW.S.A0001 + PICS: DGSW.S.A0000 response: constraints: type: list diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_2.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_2.yaml index 82e79debbf4c59..6e34679157e549 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_2.yaml @@ -33,7 +33,7 @@ tests: - label: "Create new user" command: "SetUser" - timedInteractionTimeoutMs: 10000 + timedInteractionTimeoutMs: 1000 arguments: values: - name: "operationType" @@ -82,7 +82,7 @@ tests: - label: "Create new PIN credential and lock/unlock user" command: "SetCredential" - timedInteractionTimeoutMs: 10000 + timedInteractionTimeoutMs: 1000 arguments: values: - name: "operationType" @@ -155,22 +155,22 @@ tests: - label: "TH sends Lock Door Command to the DUT without PINCode" PICS: DRLK.S.C00.Rsp command: "LockDoor" - timedInteractionTimeoutMs: 10000 + timedInteractionTimeoutMs: 1000 response: error: 0x00 - label: "TH sends Lock Door Command to the DUT with valid PINCode" PICS: DRLK.S.C00.Rsp command: "LockDoor" - timedInteractionTimeoutMs: 10000 + timedInteractionTimeoutMs: 1000 arguments: values: - name: "pinCode" value: "123456" - label: - "TH writes the RequirePINforRemoteOperation attribute value as True on - the DUT" + "TH writes the RequirePINforRemoteOperation attribute value as False + on the DUT" PICS: DRLK.S.A0033 command: "writeAttribute" attribute: "RequirePINforRemoteOperation" @@ -178,8 +178,8 @@ tests: value: true - label: - "TH writes the RequirePINforRemoteOperation attribute value as True on - the DUT and Verify DUT responds with UNSUPPORTED_WRITE" + "TH writes the RequirePINforRemoteOperation attribute value as False + on the DUT and Verify DUT responds with UNSUPPORTED_WRITE" PICS: "!DRLK.S.A0033" command: "writeAttribute" attribute: "RequirePINforRemoteOperation" @@ -198,7 +198,7 @@ tests: - label: "TH sends Lock Door Command to the DUT with valid PINCode" PICS: DRLK.S.C00.Rsp && DRLK.S.A0033 command: "LockDoor" - timedInteractionTimeoutMs: 10000 + timedInteractionTimeoutMs: 1000 arguments: values: - name: "pinCode" @@ -207,7 +207,7 @@ tests: - label: "TH sends Lock Door Command to the DUT without valid PINCode" PICS: DRLK.S.C00.Rsp && DRLK.S.A0033 command: "LockDoor" - timedInteractionTimeoutMs: 10000 + timedInteractionTimeoutMs: 1000 arguments: values: - name: "pinCode" @@ -219,13 +219,41 @@ tests: "TH sends Lock Door Command to the DUT without any argument PINCode" PICS: DRLK.S.C00.Rsp && DRLK.S.A0033 command: "LockDoor" - timedInteractionTimeoutMs: 10000 + timedInteractionTimeoutMs: 1000 response: error: FAILURE + - label: "TH reads the WrongCodeEntryLimit attribute from the DUT" + PICS: DRLK.S.A0030 + command: "readAttribute" + attribute: "WrongCodeEntryLimit" + constraints: + minValue: 1 + maxValue: 255 + + - label: "TH sends the unlock Door command to the DUT with invalid PINCode" + PICS: DRLK.S.A0030 + command: "UnlockDoor" + timedInteractionTimeoutMs: 1000 + arguments: + values: + - name: "PINCode" + value: "1234568" + response: + error: FAILURE + + - label: "TH sends the unlock Door command to the DUT with valid PINCode" + PICS: DRLK.S.A0030 + command: "UnlockDoor" + timedInteractionTimeoutMs: 1000 + arguments: + values: + - name: "PINCode" + value: "123456" + - label: - "TH writes WrongCodeEntryLimit attribute value as 3 on the DUT and - Verify that the DUT sends Success response" + "TH writes WrongCodeEntryLimit attribute value as between 1 and 255 on + the DUT and Verify that the DUT sends Success response" PICS: DRLK.S.A0030 command: "writeAttribute" attribute: "WrongCodeEntryLimit" @@ -233,8 +261,8 @@ tests: value: 3 - label: - "TH writes WrongCodeEntryLimit attribute value as 3 on the DUT and - verify DUT responds with UNSUPPORTED_WRITE" + "TH writes WrongCodeEntryLimit attribute value as between 1 and 255 on + the DUT and verify DUT responds with UNSUPPORTED_WRITE" PICS: "!DRLK.S.A0030" command: "writeAttribute" attribute: "WrongCodeEntryLimit" @@ -243,9 +271,17 @@ tests: response: error: UNSUPPORTED_WRITE + - label: "TH reads the UserCodeTemporaryDisableTime attribute from the DUT" + PICS: DRLK.S.A0031 + command: "readAttribute" + attribute: "UserCodeTemporaryDisableTime" + constraints: + minValue: 1 + maxValue: 255 + - label: - "TH writes UserCodeTemporaryDisableTime attribute value as 15 seconds - on the DUT and Verify that the DUT send the Success response" + "TH writes UserCodeTemporaryDisableTime attribute value as between 1 + and 255 on the DUT and Verify that the DUT sends Success response" PICS: DRLK.S.A0031 command: "writeAttribute" attribute: "UserCodeTemporaryDisableTime" @@ -253,8 +289,8 @@ tests: value: 15 - label: - "TH writes UserCodeTemporaryDisableTime attribute value as 15 seconds - on the DUT and Verify DUT responds with UNSUPPORTED_WRITE" + "TH writes UserCodeTemporaryDisableTime attribute value as between 1 + and 255 on the DUT and verify DUT responds with UNSUPPORTED_WRITE" PICS: "!DRLK.S.A0031" command: "writeAttribute" attribute: "UserCodeTemporaryDisableTime" @@ -263,93 +299,9 @@ tests: response: error: UNSUPPORTED_WRITE - - label: "TH sends Lock Door Command to the DUT with invalid PINCode" - PICS: DRLK.S.C00.Rsp - command: "LockDoor" - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "pinCode" - value: "123458" - response: - error: FAILURE - - - label: "TH sends Lock Door Command to the DUT with invalid PINCode" - PICS: DRLK.S.C00.Rsp - command: "LockDoor" - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "pinCode" - value: "123458" - response: - error: FAILURE - - - label: "TH sends Lock Door Command to the DUT with invalid PINCode" - PICS: DRLK.S.C00.Rsp - command: "LockDoor" - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "pinCode" - value: "123458" - response: - error: FAILURE - - - label: "TH sends Lock Door Command to the DUT with invalid PINCode" - PICS: DRLK.S.C00.Rsp - command: "LockDoor" - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "pinCode" - value: "123458" - response: - error: FAILURE - - - label: - "TH reads UserCodeTemporaryDisableTime attribute from DUT and After - sending 3 failure responses verify that UserCodeTemporaryDisableTime - attribute is triggered" - verification: | - ./chip-tool doorlock read user-code-temporary-disable-time 1 1 - - On TH, verify the UserCodeTemporaryDisableTime value as 15 - - [1657867358.396037][2551:2556] CHIP:DMG: - [1657867358.396067][2551:2556] CHIP:DMG: SuppressResponse = true, - [1657867358.396099][2551:2556] CHIP:DMG: InteractionModelRevision = 1 - [1657867358.396129][2551:2556] CHIP:DMG: } - [1657867358.396286][2551:2556] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Attribute 0x0000_0031 DataVersion: 2082875948 - [1657867358.396378][2551:2556] CHIP:TOO: UserCodeTemporaryDisableTime: 15 - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && DRLK.S.A0031 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - - label: - "TH sends Lock Command to the DUT with valid PINCode before - UserCodeTemporaryDisableTime attribute time expires" - verification: | - Verify that DUT sends failure response to the TH - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && DRLK.S.C00.Rsp - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - label: "Clean the created user" command: "ClearUser" - timedInteractionTimeoutMs: 10000 + timedInteractionTimeoutMs: 1000 arguments: values: - name: "userIndex" @@ -358,7 +310,7 @@ tests: - label: "Cleanup the created credential" PICS: DRLK.S.C26.Rsp command: "ClearCredential" - timedInteractionTimeoutMs: 10000 + timedInteractionTimeoutMs: 1000 arguments: values: - name: "credential" diff --git a/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml index cff9707bda319c..28fd797de4d4c7 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_3_1.yaml @@ -142,7 +142,6 @@ tests: value: 0 - label: "Wait 10000ms" - PICS: LVL.S.M.VarRate cluster: "DelayCommands" command: "WaitForMs" arguments: @@ -160,7 +159,6 @@ tests: maxValue: 115 - label: "Wait 10000ms" - PICS: LVL.S.M.VarRate cluster: "DelayCommands" command: "WaitForMs" arguments: @@ -178,7 +176,6 @@ tests: maxValue: 173 - label: "Wait 10000ms" - PICS: LVL.S.M.VarRate cluster: "DelayCommands" command: "WaitForMs" arguments: @@ -196,7 +193,6 @@ tests: maxValue: 200 - label: "Wait 5000ms" - PICS: LVL.S.M.VarRate cluster: "DelayCommands" command: "WaitForMs" arguments: diff --git a/src/app/tests/suites/certification/Test_TC_LVL_5_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_5_1.yaml index 239a16fbadcae7..a909f16b621c88 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_5_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_5_1.yaml @@ -138,7 +138,6 @@ tests: value: 0 - label: "Wait 10s" - PICS: LVL.S.M.VarRate cluster: "DelayCommands" command: "WaitForMs" arguments: @@ -156,7 +155,6 @@ tests: maxValue: 115 - label: "Wait 10s" - PICS: LVL.S.M.VarRate cluster: "DelayCommands" command: "WaitForMs" arguments: @@ -174,7 +172,6 @@ tests: maxValue: 173 - label: "Wait 10s" - PICS: LVL.S.M.VarRate cluster: "DelayCommands" command: "WaitForMs" arguments: @@ -192,7 +189,6 @@ tests: maxValue: 200 - label: "Wait 5000ms" - PICS: LVL.S.M.VarRate cluster: "DelayCommands" command: "WaitForMs" arguments: diff --git a/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_3.yaml b/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_3.yaml index 3bc927d533f6cb..96e11ccf86c241 100644 --- a/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_MEDIAPLAYBACK_6_3.yaml @@ -81,9 +81,13 @@ tests: - label: "TH reads the StartTime attribute from the DUT" PICS: MEDIAPLAYBACK.S.A0001 && PICS_USER_PROMPT verification: | + "The TH commands for this test step can be invoked using chip-tool (when DUT is a commissionee) or tv-casting-app (when DUT is a commissioner): ./chip-tool mediaplayback read start-time 1 1 + ./chip-tv-casting-app mediaplayback read start-time 1 1 + + On TH Verify that the response is a valid start time or null. [1654001778189] [97015:7707437] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0506 Attribute 0x0000_0001 DataVersion: 775839144 - [1654001778190] [97015:7707437] CHIP: [TOO] StartTime: 0 + [1654001778190] [97015:7707437] CHIP: [TOO] StartTime: 0" cluster: "LogCommands" command: "UserPrompt" arguments: @@ -96,7 +100,11 @@ tests: #Issue 10988 - label: "TH reads the SeekRangeEnd attribute from the DUT" verification: | + The TH commands for this test step can be invoked using chip-tool (when DUT is a commissionee) or tv-casting-app (when DUT is a commissioner): ./chip-tool mediaplayback read seek-range-end 1 1 + ./chip-tv-casting-app mediaplayback read seek-range-end 1 1 + + On TH Verify that the response is a valid position or Nas. [1654002119527] [97409:7712444] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0506 Attribute 0x0000_0005 DataVersion: 775839144 [1654002119527] [97409:7712444] CHIP: [TOO] SeekRangeEnd: 80000 cluster: "LogCommands" @@ -112,10 +120,18 @@ tests: #Issue 10988 - label: "TH reads the SeekRangeStart attribute from the DUT" verification: | + The TH commands for this test step can be invoked using chip-tool (when DUT is a commissionee) or tv-casting-app (when DUT is a commissioner): ./chip-tool mediaplayback read seek-range-start 1 1 - [1654751320.161753][2491:2496] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0506 Attribute 0x0000_0006 DataVersion: 1615951406 - [1654751320.161846][2491:2496] CHIP:TOO: SeekRangeStart: 10000 - [1654751320.161941][2491:2496] CHIP:EM: Sending Standalone Ack for MessageCounter:120565821 on exchange 1929 + ./chip-tv-casting-app mediaplayback read seek-range-start 1 1 + + On TH Verify that the response is a valid position or Nas. + [1661240180.806771][2930:2935] CHIP:DMG: SuppressResponse = true, + [1661240180.806809][2930:2935] CHIP:DMG: InteractionModelRevision = 1 + [1661240180.806844][2930:2935] CHIP:DMG: } + [1661240180.807024][2930:2935] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0506 Attribute 0x0000_0006 DataVersion: 1520269522 + [1661240180.807103][2930:2935] CHIP:TOO: SeekRangeStart: 0 + [1661240180.807211][2930:2935] CHIP:EM: Sending Standalone Ack for MessageCounter:164562596 on exchange 31684i + [1661240180.807299][2930:2935] CHIP:IN: Prepared secure message 0xffff95f5d978 to 0x0000000000000001 (1) of type 0x10 and protocolId (0, 0) on exchange 31684i with MessageCounter:104721987.s cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT && MEDIAPLAYBACK.S.A0006 @@ -129,7 +145,11 @@ tests: #Issue 10988 - label: "TH reads the Duration attribute from the DUT" verification: | + The TH commands for this test step can be invoked using chip-tool (when DUT is a commissionee) or tv-casting-app (when DUT is a commissioner): ./chip-tool mediaplayback read duration 1 1 + ./chip-tv-casting-app mediaplayback read duration 1 1 + + On TH Verify that the response is null or not 0. [1654001869267] [97168:7708957] CHIP: [TOO] Endpoint: 1 Cluster: 0x0000_0506 Attribute 0x0000_0002 DataVersion: 775839144 [1654001869267] [97168:7708957] CHIP: [TOO] Duration: 80000 cluster: "LogCommands" diff --git a/src/app/tests/suites/certification/ci-pics-values b/src/app/tests/suites/certification/ci-pics-values index adef2a6a62af76..5f22d02e45d4ea 100644 --- a/src/app/tests/suites/certification/ci-pics-values +++ b/src/app/tests/suites/certification/ci-pics-values @@ -1681,3 +1681,4 @@ MCORE.IDM.C.WriteRequest.Attribute.DataType_Enum=1 MCORE.IDM.C.WriteRequest.Attribute.DataType_Bitmap=1 MCORE.IDM.C.SubscribeRequest.Attribute.DataType_Bool=1 MCORE.IDM.C.SubscribeRequest.MultipleAttributes=1 +MCORE.UI.FACTORYRESET=1 diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 622bbc05c8b3af..e10572dc68a218 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -1888,7 +1888,7 @@ class TestAccessControlClusterSuite : public TestCommand class Test_TC_ACL_1_1Suite : public TestCommand { public: - Test_TC_ACL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_1_1", 6, credsIssuerConfig) + Test_TC_ACL_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACL_1_1", 7, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -1950,7 +1950,6 @@ class Test_TC_ACL_1_1Suite : public TestCommand VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); VerifyOrReturn(CheckConstraintType("value", "list", "list")); VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); VerifyOrReturn(CheckConstraintContains("value", value, 4UL)); @@ -1962,6 +1961,15 @@ class Test_TC_ACL_1_1Suite : public TestCommand } break; case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + chip::app::DataModel::DecodableList value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintType("value", "list", "list")); + VerifyOrReturn(CheckConstraintContains("value", value, 1UL)); + } + break; + case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -1973,7 +1981,7 @@ class Test_TC_ACL_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 5: + case 6: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -2023,12 +2031,18 @@ class Test_TC_ACL_1_1Suite : public TestCommand true, chip::NullOptional); } case 4: { - LogStep(4, "TH reads AcceptedCommandList attribute from DUT"); + LogStep(4, "TH reads optional attribute (Extension) in AttributeList"); + VerifyOrDo(!ShouldSkip("ACL.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::AttributeList::Id, + true, chip::NullOptional); + } + case 5: { + LogStep(5, "TH reads AcceptedCommandList attribute from DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 5: { - LogStep(5, "TH reads GeneratedCommandList attribute from DUT"); + case 6: { + LogStep(6, "TH reads GeneratedCommandList attribute from DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::GeneratedCommandList::Id, true, chip::NullOptional); } @@ -18755,7 +18769,6 @@ class Test_TC_LVL_3_1Suite : public TestCommand } case 13: { LogStep(13, "Wait 10000ms"); - VerifyOrDo(!ShouldSkip("LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; @@ -18770,7 +18783,6 @@ class Test_TC_LVL_3_1Suite : public TestCommand } case 15: { LogStep(15, "Wait 10000ms"); - VerifyOrDo(!ShouldSkip("LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; @@ -18785,7 +18797,6 @@ class Test_TC_LVL_3_1Suite : public TestCommand } case 17: { LogStep(17, "Wait 10000ms"); - VerifyOrDo(!ShouldSkip("LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; @@ -18800,7 +18811,6 @@ class Test_TC_LVL_3_1Suite : public TestCommand } case 19: { LogStep(19, "Wait 5000ms"); - VerifyOrDo(!ShouldSkip("LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; @@ -19764,7 +19774,6 @@ class Test_TC_LVL_5_1Suite : public TestCommand } case 12: { LogStep(12, "Wait 10s"); - VerifyOrDo(!ShouldSkip("LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; @@ -19779,7 +19788,6 @@ class Test_TC_LVL_5_1Suite : public TestCommand } case 14: { LogStep(14, "Wait 10s"); - VerifyOrDo(!ShouldSkip("LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; @@ -19794,7 +19802,6 @@ class Test_TC_LVL_5_1Suite : public TestCommand } case 16: { LogStep(16, "Wait 10s"); - VerifyOrDo(!ShouldSkip("LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 10000UL; @@ -19809,7 +19816,6 @@ class Test_TC_LVL_5_1Suite : public TestCommand } case 18: { LogStep(18, "Wait 5000ms"); - VerifyOrDo(!ShouldSkip("LVL.S.M.VarRate"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = 5000UL; @@ -61363,7 +61369,7 @@ class Test_TC_DGSW_2_3Suite : public TestCommand } case 2: { LogStep(2, "Reads a list of ThreadMetrics struct attribute from DUT."); - VerifyOrDo(!ShouldSkip("DGSW.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("DGSW.S.A0000"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), SoftwareDiagnostics::Id, SoftwareDiagnostics::Attributes::ThreadMetrics::Id, true, chip::NullOptional); } @@ -68556,7 +68562,7 @@ class Test_TC_DRLK_1_1Suite : public TestCommand class Test_TC_DRLK_2_2Suite : public TestCommand { public: - Test_TC_DRLK_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DRLK_2_2", 28, credsIssuerConfig) + Test_TC_DRLK_2_2Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DRLK_2_2", 26, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -68691,40 +68697,40 @@ class Test_TC_DRLK_2_2Suite : public TestCommand break; case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + } break; case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); break; case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + } break; case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); break; case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 25: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; - break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; default: @@ -68766,7 +68772,7 @@ class Test_TC_DRLK_2_2Suite : public TestCommand value.credentialRule.SetNonNull(); value.credentialRule.Value() = static_cast(0); return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetUser::Id, value, - chip::Optional(10000), chip::NullOptional + chip::Optional(1000), chip::NullOptional ); } @@ -68795,7 +68801,7 @@ class Test_TC_DRLK_2_2Suite : public TestCommand value.userStatus.SetNull(); value.userType.SetNull(); return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, - chip::Optional(10000), chip::NullOptional + chip::Optional(1000), chip::NullOptional ); } @@ -68846,7 +68852,7 @@ class Test_TC_DRLK_2_2Suite : public TestCommand ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::LockDoor::Id, value, - chip::Optional(10000), chip::NullOptional + chip::Optional(1000), chip::NullOptional ); } @@ -68858,12 +68864,12 @@ class Test_TC_DRLK_2_2Suite : public TestCommand value.pinCode.Emplace(); value.pinCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::LockDoor::Id, value, - chip::Optional(10000), chip::NullOptional + chip::Optional(1000), chip::NullOptional ); } case 10: { - LogStep(10, "TH writes the RequirePINforRemoteOperation attribute value as True on the DUT"); + LogStep(10, "TH writes the RequirePINforRemoteOperation attribute value as False on the DUT"); VerifyOrDo(!ShouldSkip("DRLK.S.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; bool value; @@ -68874,7 +68880,7 @@ class Test_TC_DRLK_2_2Suite : public TestCommand } case 11: { LogStep(11, - "TH writes the RequirePINforRemoteOperation attribute value as True on the DUT and Verify DUT responds with " + "TH writes the RequirePINforRemoteOperation attribute value as False on the DUT and Verify DUT responds with " "UNSUPPORTED_WRITE"); VerifyOrDo(!ShouldSkip("!DRLK.S.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -68898,7 +68904,7 @@ class Test_TC_DRLK_2_2Suite : public TestCommand value.pinCode.Emplace(); value.pinCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::LockDoor::Id, value, - chip::Optional(10000), chip::NullOptional + chip::Optional(1000), chip::NullOptional ); } @@ -68910,7 +68916,7 @@ class Test_TC_DRLK_2_2Suite : public TestCommand value.pinCode.Emplace(); value.pinCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("645321garbage: not in length on purpose"), 6); return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::LockDoor::Id, value, - chip::Optional(10000), chip::NullOptional + chip::Optional(1000), chip::NullOptional ); } @@ -68920,13 +68926,44 @@ class Test_TC_DRLK_2_2Suite : public TestCommand ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::LockDoor::Id, value, - chip::Optional(10000), chip::NullOptional + chip::Optional(1000), chip::NullOptional ); } case 16: { - LogStep(16, - "TH writes WrongCodeEntryLimit attribute value as 3 on the DUT and Verify that the DUT sends Success response"); + LogStep(16, "TH reads the WrongCodeEntryLimit attribute from the DUT"); + VerifyOrDo(!ShouldSkip("DRLK.S.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::WrongCodeEntryLimit::Id, true, + chip::NullOptional); + } + case 17: { + LogStep(17, "TH sends the unlock Door command to the DUT with invalid PINCode"); + VerifyOrDo(!ShouldSkip("DRLK.S.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type value; + value.pinCode.Emplace(); + value.pinCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("1234568garbage: not in length on purpose"), 7); + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::UnlockDoor::Id, value, + chip::Optional(1000), chip::NullOptional + + ); + } + case 18: { + LogStep(18, "TH sends the unlock Door command to the DUT with valid PINCode"); + VerifyOrDo(!ShouldSkip("DRLK.S.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::DoorLock::Commands::UnlockDoor::Type value; + value.pinCode.Emplace(); + value.pinCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("123456garbage: not in length on purpose"), 6); + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::UnlockDoor::Id, value, + chip::Optional(1000), chip::NullOptional + + ); + } + case 19: { + LogStep(19, + "TH writes WrongCodeEntryLimit attribute value as between 1 and 255 on the DUT and Verify that the DUT sends " + "Success response"); VerifyOrDo(!ShouldSkip("DRLK.S.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; @@ -68934,9 +68971,10 @@ class Test_TC_DRLK_2_2Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::WrongCodeEntryLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 17: { - LogStep(17, - "TH writes WrongCodeEntryLimit attribute value as 3 on the DUT and verify DUT responds with UNSUPPORTED_WRITE"); + case 20: { + LogStep(20, + "TH writes WrongCodeEntryLimit attribute value as between 1 and 255 on the DUT and verify DUT responds with " + "UNSUPPORTED_WRITE"); VerifyOrDo(!ShouldSkip("!DRLK.S.A0030"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; @@ -68944,10 +68982,16 @@ class Test_TC_DRLK_2_2Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::WrongCodeEntryLimit::Id, value, chip::NullOptional, chip::NullOptional); } - case 18: { - LogStep(18, - "TH writes UserCodeTemporaryDisableTime attribute value as 15 seconds on the DUT and Verify that the DUT send " - "the Success response"); + case 21: { + LogStep(21, "TH reads the UserCodeTemporaryDisableTime attribute from the DUT"); + VerifyOrDo(!ShouldSkip("DRLK.S.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, + DoorLock::Attributes::UserCodeTemporaryDisableTime::Id, true, chip::NullOptional); + } + case 22: { + LogStep(22, + "TH writes UserCodeTemporaryDisableTime attribute value as between 1 and 255 on the DUT and Verify that the " + "DUT sends Success response"); VerifyOrDo(!ShouldSkip("DRLK.S.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; @@ -68956,10 +69000,10 @@ class Test_TC_DRLK_2_2Suite : public TestCommand DoorLock::Attributes::UserCodeTemporaryDisableTime::Id, value, chip::NullOptional, chip::NullOptional); } - case 19: { - LogStep(19, - "TH writes UserCodeTemporaryDisableTime attribute value as 15 seconds on the DUT and Verify DUT responds with " - "UNSUPPORTED_WRITE"); + case 23: { + LogStep(23, + "TH writes UserCodeTemporaryDisableTime attribute value as between 1 and 255 on the DUT and verify DUT " + "responds with UNSUPPORTED_WRITE"); VerifyOrDo(!ShouldSkip("!DRLK.S.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; uint8_t value; @@ -68968,90 +69012,18 @@ class Test_TC_DRLK_2_2Suite : public TestCommand DoorLock::Attributes::UserCodeTemporaryDisableTime::Id, value, chip::NullOptional, chip::NullOptional); } - case 20: { - LogStep(20, "TH sends Lock Door Command to the DUT with invalid PINCode"); - VerifyOrDo(!ShouldSkip("DRLK.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; - value.pinCode.Emplace(); - value.pinCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("123458garbage: not in length on purpose"), 6); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::LockDoor::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 21: { - LogStep(21, "TH sends Lock Door Command to the DUT with invalid PINCode"); - VerifyOrDo(!ShouldSkip("DRLK.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; - value.pinCode.Emplace(); - value.pinCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("123458garbage: not in length on purpose"), 6); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::LockDoor::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 22: { - LogStep(22, "TH sends Lock Door Command to the DUT with invalid PINCode"); - VerifyOrDo(!ShouldSkip("DRLK.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; - value.pinCode.Emplace(); - value.pinCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("123458garbage: not in length on purpose"), 6); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::LockDoor::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } - case 23: { - LogStep(23, "TH sends Lock Door Command to the DUT with invalid PINCode"); - VerifyOrDo(!ShouldSkip("DRLK.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::DoorLock::Commands::LockDoor::Type value; - value.pinCode.Emplace(); - value.pinCode.Value() = chip::ByteSpan(chip::Uint8::from_const_char("123458garbage: not in length on purpose"), 6); - return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::LockDoor::Id, value, - chip::Optional(10000), chip::NullOptional - - ); - } case 24: { - LogStep(24, - "TH reads UserCodeTemporaryDisableTime attribute from DUT and After sending 3 failure responses verify that " - "UserCodeTemporaryDisableTime attribute is triggered"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DRLK.S.A0031"), 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 25: { - LogStep( - 25, - "TH sends Lock Command to the DUT with valid PINCode before UserCodeTemporaryDisableTime attribute time expires"); - VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DRLK.S.C00.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); - } - case 26: { - LogStep(26, "Clean the created user"); + LogStep(24, "Clean the created user"); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearUser::Type value; value.userIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearUser::Id, value, - chip::Optional(10000), chip::NullOptional + chip::Optional(1000), chip::NullOptional ); } - case 27: { - LogStep(27, "Cleanup the created credential"); + case 25: { + LogStep(25, "Cleanup the created credential"); VerifyOrDo(!ShouldSkip("DRLK.S.C26.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; @@ -69061,7 +69033,7 @@ class Test_TC_DRLK_2_2Suite : public TestCommand value.credential.Value().credentialIndex = 1U; return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::ClearCredential::Id, value, - chip::Optional(10000), chip::NullOptional + chip::Optional(1000), chip::NullOptional ); } diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index 23ae57cd163059..0c93c2533efd91 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -2161,12 +2161,20 @@ class Test_TC_ACL_1_1 : public TestCommandBridge { err = TestThReadsAttributeListAttributeFromDut_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads AcceptedCommandList attribute from DUT\n"); - err = TestThReadsAcceptedCommandListAttributeFromDut_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads optional attribute (Extension) in AttributeList\n"); + if (ShouldSkip("ACL.S.A0001")) { + NextTest(); + return; + } + err = TestThReadsOptionalAttributeExtensionInAttributeList_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads GeneratedCommandList attribute from DUT\n"); - err = TestThReadsGeneratedCommandListAttributeFromDut_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads AcceptedCommandList attribute from DUT\n"); + err = TestThReadsAcceptedCommandListAttributeFromDut_5(); + break; + case 6: + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads GeneratedCommandList attribute from DUT\n"); + err = TestThReadsGeneratedCommandListAttributeFromDut_6(); break; } @@ -2197,6 +2205,9 @@ class Test_TC_ACL_1_1 : public TestCommandBridge { case 5: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -2210,7 +2221,7 @@ class Test_TC_ACL_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 6; + const uint16_t mTestCount = 7; chip::Optional mNodeId; chip::Optional mCluster; @@ -2289,7 +2300,6 @@ class Test_TC_ACL_1_1 : public TestCommandBridge { VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); VerifyOrReturn(CheckConstraintContains("attributeList", value, 0UL)); - VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 2UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 3UL)); VerifyOrReturn(CheckConstraintContains("attributeList", value, 4UL)); @@ -2305,7 +2315,29 @@ class Test_TC_ACL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsAcceptedCommandListAttributeFromDut_4() + CHIP_ERROR TestThReadsOptionalAttributeExtensionInAttributeList_4() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeAttributeListWithCompletionHandler:^(NSArray * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads optional attribute (Extension) in AttributeList Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintType("attributeList", "list", "list")); + VerifyOrReturn(CheckConstraintContains("attributeList", value, 1UL)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsAcceptedCommandListAttributeFromDut_5() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device @@ -2330,7 +2362,7 @@ class Test_TC_ACL_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThReadsGeneratedCommandListAttributeFromDut_5() + CHIP_ERROR TestThReadsGeneratedCommandListAttributeFromDut_6() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterAccessControl * cluster = [[MTRBaseClusterAccessControl alloc] initWithDevice:device @@ -26613,10 +26645,6 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { break; case 13: ChipLogProgress(chipTool, " ***** Test Step 13 : Wait 10000ms\n"); - if (ShouldSkip("LVL.S.M.VarRate")) { - NextTest(); - return; - } err = TestWait10000ms_13(); break; case 14: @@ -26629,10 +26657,6 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { break; case 15: ChipLogProgress(chipTool, " ***** Test Step 15 : Wait 10000ms\n"); - if (ShouldSkip("LVL.S.M.VarRate")) { - NextTest(); - return; - } err = TestWait10000ms_15(); break; case 16: @@ -26645,10 +26669,6 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { break; case 17: ChipLogProgress(chipTool, " ***** Test Step 17 : Wait 10000ms\n"); - if (ShouldSkip("LVL.S.M.VarRate")) { - NextTest(); - return; - } err = TestWait10000ms_17(); break; case 18: @@ -26661,10 +26681,6 @@ class Test_TC_LVL_3_1 : public TestCommandBridge { break; case 19: ChipLogProgress(chipTool, " ***** Test Step 19 : Wait 5000ms\n"); - if (ShouldSkip("LVL.S.M.VarRate")) { - NextTest(); - return; - } err = TestWait5000ms_19(); break; case 20: @@ -29008,10 +29024,6 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { break; case 12: ChipLogProgress(chipTool, " ***** Test Step 12 : Wait 10s\n"); - if (ShouldSkip("LVL.S.M.VarRate")) { - NextTest(); - return; - } err = TestWait10s_12(); break; case 13: @@ -29024,10 +29036,6 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { break; case 14: ChipLogProgress(chipTool, " ***** Test Step 14 : Wait 10s\n"); - if (ShouldSkip("LVL.S.M.VarRate")) { - NextTest(); - return; - } err = TestWait10s_14(); break; case 15: @@ -29040,10 +29048,6 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { break; case 16: ChipLogProgress(chipTool, " ***** Test Step 16 : Wait 10s\n"); - if (ShouldSkip("LVL.S.M.VarRate")) { - NextTest(); - return; - } err = TestWait10s_16(); break; case 17: @@ -29056,10 +29060,6 @@ class Test_TC_LVL_5_1 : public TestCommandBridge { break; case 18: ChipLogProgress(chipTool, " ***** Test Step 18 : Wait 5000ms\n"); - if (ShouldSkip("LVL.S.M.VarRate")) { - NextTest(); - return; - } err = TestWait5000ms_18(); break; case 19: @@ -103732,7 +103732,7 @@ class Test_TC_DGSW_2_3 : public TestCommandBridge { break; case 2: ChipLogProgress(chipTool, " ***** Test Step 2 : Reads a list of ThreadMetrics struct attribute from DUT.\n"); - if (ShouldSkip("DGSW.S.A0001")) { + if (ShouldSkip("DGSW.S.A0000")) { NextTest(); return; } @@ -118590,22 +118590,22 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { break; case 10: ChipLogProgress( - chipTool, " ***** Test Step 10 : TH writes the RequirePINforRemoteOperation attribute value as True on the DUT\n"); + chipTool, " ***** Test Step 10 : TH writes the RequirePINforRemoteOperation attribute value as False on the DUT\n"); if (ShouldSkip("DRLK.S.A0033")) { NextTest(); return; } - err = TestThWritesTheRequirePINforRemoteOperationAttributeValueAsTrueOnTheDut_10(); + err = TestThWritesTheRequirePINforRemoteOperationAttributeValueAsFalseOnTheDut_10(); break; case 11: ChipLogProgress(chipTool, - " ***** Test Step 11 : TH writes the RequirePINforRemoteOperation attribute value as True on the DUT and Verify " + " ***** Test Step 11 : TH writes the RequirePINforRemoteOperation attribute value as False on the DUT and Verify " "DUT responds with UNSUPPORTED_WRITE\n"); if (ShouldSkip("!DRLK.S.A0033")) { NextTest(); return; } - err = TestThWritesTheRequirePINforRemoteOperationAttributeValueAsTrueOnTheDutAndVerifyDutRespondsWithUnsupportedWrite_11(); + err = TestThWritesTheRequirePINforRemoteOperationAttributeValueAsFalseOnTheDutAndVerifyDutRespondsWithUnsupportedWrite_11(); break; case 12: ChipLogProgress(chipTool, " ***** Test Step 12 : TH reads the RequirePINforRemoteOperation attribute from the DUT\n"); @@ -118640,108 +118640,88 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { err = TestThSendsLockDoorCommandToTheDutWithoutAnyArgumentPINCode_15(); break; case 16: - ChipLogProgress(chipTool, - " ***** Test Step 16 : TH writes WrongCodeEntryLimit attribute value as 3 on the DUT and Verify that the DUT sends " - "Success response\n"); + ChipLogProgress(chipTool, " ***** Test Step 16 : TH reads the WrongCodeEntryLimit attribute from the DUT\n"); if (ShouldSkip("DRLK.S.A0030")) { NextTest(); return; } - err = TestThWritesWrongCodeEntryLimitAttributeValueAs3OnTheDutAndVerifyThatTheDutSendsSuccessResponse_16(); + err = TestThReadsTheWrongCodeEntryLimitAttributeFromTheDut_16(); break; case 17: - ChipLogProgress(chipTool, - " ***** Test Step 17 : TH writes WrongCodeEntryLimit attribute value as 3 on the DUT and verify DUT responds with " - "UNSUPPORTED_WRITE\n"); - if (ShouldSkip("!DRLK.S.A0030")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : TH sends the unlock Door command to the DUT with invalid PINCode\n"); + if (ShouldSkip("DRLK.S.A0030")) { NextTest(); return; } - err = TestThWritesWrongCodeEntryLimitAttributeValueAs3OnTheDutAndVerifyDutRespondsWithUnsupportedWrite_17(); + err = TestThSendsTheUnlockDoorCommandToTheDutWithInvalidPINCode_17(); break; case 18: - ChipLogProgress(chipTool, - " ***** Test Step 18 : TH writes UserCodeTemporaryDisableTime attribute value as 15 seconds on the DUT and Verify " - "that the DUT send the Success response\n"); - if (ShouldSkip("DRLK.S.A0031")) { + ChipLogProgress(chipTool, " ***** Test Step 18 : TH sends the unlock Door command to the DUT with valid PINCode\n"); + if (ShouldSkip("DRLK.S.A0030")) { NextTest(); return; } - err = TestThWritesUserCodeTemporaryDisableTimeAttributeValueAs15SecondsOnTheDutAndVerifyThatTheDutSendTheSuccessResponse_18(); + err = TestThSendsTheUnlockDoorCommandToTheDutWithValidPINCode_18(); break; case 19: ChipLogProgress(chipTool, - " ***** Test Step 19 : TH writes UserCodeTemporaryDisableTime attribute value as 15 seconds on the DUT and Verify " - "DUT responds with UNSUPPORTED_WRITE\n"); - if (ShouldSkip("!DRLK.S.A0031")) { + " ***** Test Step 19 : TH writes WrongCodeEntryLimit attribute value as between 1 and 255 on the DUT and Verify " + "that the DUT sends Success response\n"); + if (ShouldSkip("DRLK.S.A0030")) { NextTest(); return; } - err = TestThWritesUserCodeTemporaryDisableTimeAttributeValueAs15SecondsOnTheDutAndVerifyDutRespondsWithUnsupportedWrite_19(); + err = TestThWritesWrongCodeEntryLimitAttributeValueAsBetween1And255OnTheDutAndVerifyThatTheDutSendsSuccessResponse_19(); break; case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : TH sends Lock Door Command to the DUT with invalid PINCode\n"); - if (ShouldSkip("DRLK.S.C00.Rsp")) { + ChipLogProgress(chipTool, + " ***** Test Step 20 : TH writes WrongCodeEntryLimit attribute value as between 1 and 255 on the DUT and verify " + "DUT responds with UNSUPPORTED_WRITE\n"); + if (ShouldSkip("!DRLK.S.A0030")) { NextTest(); return; } - err = TestThSendsLockDoorCommandToTheDutWithInvalidPINCode_20(); + err = TestThWritesWrongCodeEntryLimitAttributeValueAsBetween1And255OnTheDutAndVerifyDutRespondsWithUnsupportedWrite_20(); break; case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : TH sends Lock Door Command to the DUT with invalid PINCode\n"); - if (ShouldSkip("DRLK.S.C00.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 21 : TH reads the UserCodeTemporaryDisableTime attribute from the DUT\n"); + if (ShouldSkip("DRLK.S.A0031")) { NextTest(); return; } - err = TestThSendsLockDoorCommandToTheDutWithInvalidPINCode_21(); + err = TestThReadsTheUserCodeTemporaryDisableTimeAttributeFromTheDut_21(); break; case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : TH sends Lock Door Command to the DUT with invalid PINCode\n"); - if (ShouldSkip("DRLK.S.C00.Rsp")) { + ChipLogProgress(chipTool, + " ***** Test Step 22 : TH writes UserCodeTemporaryDisableTime attribute value as between 1 and 255 on the DUT and " + "Verify that the DUT sends Success response\n"); + if (ShouldSkip("DRLK.S.A0031")) { NextTest(); return; } - err = TestThSendsLockDoorCommandToTheDutWithInvalidPINCode_22(); + err = TestThWritesUserCodeTemporaryDisableTimeAttributeValueAsBetween1And255OnTheDutAndVerifyThatTheDutSendsSuccessResponse_22(); break; case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : TH sends Lock Door Command to the DUT with invalid PINCode\n"); - if (ShouldSkip("DRLK.S.C00.Rsp")) { + ChipLogProgress(chipTool, + " ***** Test Step 23 : TH writes UserCodeTemporaryDisableTime attribute value as between 1 and 255 on the DUT and " + "verify DUT responds with UNSUPPORTED_WRITE\n"); + if (ShouldSkip("!DRLK.S.A0031")) { NextTest(); return; } - err = TestThSendsLockDoorCommandToTheDutWithInvalidPINCode_23(); + err = TestThWritesUserCodeTemporaryDisableTimeAttributeValueAsBetween1And255OnTheDutAndVerifyDutRespondsWithUnsupportedWrite_23(); break; case 24: - ChipLogProgress(chipTool, - " ***** Test Step 24 : TH reads UserCodeTemporaryDisableTime attribute from DUT and After sending 3 failure " - "responses verify that UserCodeTemporaryDisableTime attribute is triggered\n"); - if (ShouldSkip("PICS_USER_PROMPT && DRLK.S.A0031")) { - NextTest(); - return; - } - err = TestThReadsUserCodeTemporaryDisableTimeAttributeFromDutAndAfterSending3FailureResponsesVerifyThatUserCodeTemporaryDisableTimeAttributeIsTriggered_24(); + ChipLogProgress(chipTool, " ***** Test Step 24 : Clean the created user\n"); + err = TestCleanTheCreatedUser_24(); break; case 25: - ChipLogProgress(chipTool, - " ***** Test Step 25 : TH sends Lock Command to the DUT with valid PINCode before UserCodeTemporaryDisableTime " - "attribute time expires\n"); - if (ShouldSkip("PICS_USER_PROMPT && DRLK.S.C00.Rsp")) { - NextTest(); - return; - } - err = TestThSendsLockCommandToTheDutWithValidPINCodeBeforeUserCodeTemporaryDisableTimeAttributeTimeExpires_25(); - break; - case 26: - ChipLogProgress(chipTool, " ***** Test Step 26 : Clean the created user\n"); - err = TestCleanTheCreatedUser_26(); - break; - case 27: - ChipLogProgress(chipTool, " ***** Test Step 27 : Cleanup the created credential\n"); + ChipLogProgress(chipTool, " ***** Test Step 25 : Cleanup the created credential\n"); if (ShouldSkip("DRLK.S.C26.Rsp")) { NextTest(); return; } - err = TestCleanupTheCreatedCredential_27(); + err = TestCleanupTheCreatedCredential_25(); break; } @@ -118806,25 +118786,25 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 17: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); break; case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); break; case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_FAILURE)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_WRITE)); break; case 24: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -118832,12 +118812,6 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { case 25: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 26: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 27: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -118851,7 +118825,7 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 28; + const uint16_t mTestCount = 26; chip::Optional mNodeId; chip::Optional mCluster; @@ -119175,7 +119149,7 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThWritesTheRequirePINforRemoteOperationAttributeValueAsTrueOnTheDut_10() + CHIP_ERROR TestThWritesTheRequirePINforRemoteOperationAttributeValueAsFalseOnTheDut_10() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -119185,7 +119159,7 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { requirePINforRemoteOperationArgument = [NSNumber numberWithBool:true]; [cluster writeAttributeRequirePINforRemoteOperationWithValue:requirePINforRemoteOperationArgument completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes the RequirePINforRemoteOperation attribute value as True " + NSLog(@"TH writes the RequirePINforRemoteOperation attribute value as False " @"on the DUT Error: %@", err); @@ -119197,7 +119171,7 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThWritesTheRequirePINforRemoteOperationAttributeValueAsTrueOnTheDutAndVerifyDutRespondsWithUnsupportedWrite_11() + CHIP_ERROR TestThWritesTheRequirePINforRemoteOperationAttributeValueAsFalseOnTheDutAndVerifyDutRespondsWithUnsupportedWrite_11() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -119207,7 +119181,7 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { requirePINforRemoteOperationArgument = [NSNumber numberWithBool:true]; [cluster writeAttributeRequirePINforRemoteOperationWithValue:requirePINforRemoteOperationArgument completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes the RequirePINforRemoteOperation attribute value as True " + NSLog(@"TH writes the RequirePINforRemoteOperation attribute value as False " @"on the DUT and Verify DUT responds with UNSUPPORTED_WRITE Error: %@", err); @@ -119307,7 +119281,66 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThWritesWrongCodeEntryLimitAttributeValueAs3OnTheDutAndVerifyThatTheDutSendsSuccessResponse_16() + CHIP_ERROR TestThReadsTheWrongCodeEntryLimitAttributeFromTheDut_16() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeWrongCodeEntryLimitWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the WrongCodeEntryLimit attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsTheUnlockDoorCommandToTheDutWithInvalidPINCode_17() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; + params.pinCode = [[NSData alloc] initWithBytes:"1234568" length:7]; + [cluster + unlockDoorWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends the unlock Door command to the DUT with invalid PINCode Error: %@", err); + + VerifyOrReturn(CheckValue("status", + err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, + EMBER_ZCL_STATUS_FAILURE)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsTheUnlockDoorCommandToTheDutWithValidPINCode_18() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRDoorLockClusterUnlockDoorParams alloc] init]; + params.pinCode = [[NSData alloc] initWithBytes:"123456" length:6]; + [cluster unlockDoorWithParams:params + completionHandler:^(NSError * _Nullable err) { + NSLog(@"TH sends the unlock Door command to the DUT with valid PINCode Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThWritesWrongCodeEntryLimitAttributeValueAsBetween1And255OnTheDutAndVerifyThatTheDutSendsSuccessResponse_19() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -119317,8 +119350,8 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { wrongCodeEntryLimitArgument = [NSNumber numberWithUnsignedChar:3U]; [cluster writeAttributeWrongCodeEntryLimitWithValue:wrongCodeEntryLimitArgument completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes WrongCodeEntryLimit attribute value as 3 on the DUT and Verify " - @"that the DUT sends Success response Error: %@", + NSLog(@"TH writes WrongCodeEntryLimit attribute value as between 1 and 255 on the " + @"DUT and Verify that the DUT sends Success response Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -119329,7 +119362,7 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThWritesWrongCodeEntryLimitAttributeValueAs3OnTheDutAndVerifyDutRespondsWithUnsupportedWrite_17() + CHIP_ERROR TestThWritesWrongCodeEntryLimitAttributeValueAsBetween1And255OnTheDutAndVerifyDutRespondsWithUnsupportedWrite_20() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -119339,8 +119372,8 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { wrongCodeEntryLimitArgument = [NSNumber numberWithUnsignedChar:3U]; [cluster writeAttributeWrongCodeEntryLimitWithValue:wrongCodeEntryLimitArgument completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes WrongCodeEntryLimit attribute value as 3 on the DUT and verify DUT " - @"responds with UNSUPPORTED_WRITE Error: %@", + NSLog(@"TH writes WrongCodeEntryLimit attribute value as between 1 and 255 on the " + @"DUT and verify DUT responds with UNSUPPORTED_WRITE Error: %@", err); VerifyOrReturn(CheckValue("status", @@ -119355,8 +119388,26 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } + CHIP_ERROR TestThReadsTheUserCodeTemporaryDisableTimeAttributeFromTheDut_21() + { + MTRBaseDevice * device = GetDevice("alpha"); + MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster + readAttributeUserCodeTemporaryDisableTimeWithCompletionHandler:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads the UserCodeTemporaryDisableTime attribute from the DUT Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + CHIP_ERROR - TestThWritesUserCodeTemporaryDisableTimeAttributeValueAs15SecondsOnTheDutAndVerifyThatTheDutSendTheSuccessResponse_18() + TestThWritesUserCodeTemporaryDisableTimeAttributeValueAsBetween1And255OnTheDutAndVerifyThatTheDutSendsSuccessResponse_22() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -119367,8 +119418,8 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { [cluster writeAttributeUserCodeTemporaryDisableTimeWithValue:userCodeTemporaryDisableTimeArgument completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes UserCodeTemporaryDisableTime attribute value as 15 seconds on " - @"the DUT and Verify that the DUT send the Success response Error: %@", + NSLog(@"TH writes UserCodeTemporaryDisableTime attribute value as between 1 and " + @"255 on the DUT and Verify that the DUT sends Success response Error: %@", err); VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); @@ -119380,7 +119431,7 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { } CHIP_ERROR - TestThWritesUserCodeTemporaryDisableTimeAttributeValueAs15SecondsOnTheDutAndVerifyDutRespondsWithUnsupportedWrite_19() + TestThWritesUserCodeTemporaryDisableTimeAttributeValueAsBetween1And255OnTheDutAndVerifyDutRespondsWithUnsupportedWrite_23() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -119391,8 +119442,8 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { [cluster writeAttributeUserCodeTemporaryDisableTimeWithValue:userCodeTemporaryDisableTimeArgument completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH writes UserCodeTemporaryDisableTime attribute value as 15 seconds on " - @"the DUT and Verify DUT responds with UNSUPPORTED_WRITE Error: %@", + NSLog(@"TH writes UserCodeTemporaryDisableTime attribute value as between 1 and " + @"255 on the DUT and verify DUT responds with UNSUPPORTED_WRITE Error: %@", err); VerifyOrReturn(CheckValue("status", @@ -119407,110 +119458,7 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithInvalidPINCode_20() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; - params.pinCode = [[NSData alloc] initWithBytes:"123458" length:6]; - [cluster lockDoorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends Lock Door Command to the DUT with invalid PINCode Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithInvalidPINCode_21() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; - params.pinCode = [[NSData alloc] initWithBytes:"123458" length:6]; - [cluster lockDoorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends Lock Door Command to the DUT with invalid PINCode Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithInvalidPINCode_22() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; - params.pinCode = [[NSData alloc] initWithBytes:"123458" length:6]; - [cluster lockDoorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends Lock Door Command to the DUT with invalid PINCode Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestThSendsLockDoorCommandToTheDutWithInvalidPINCode_23() - { - MTRBaseDevice * device = GetDevice("alpha"); - MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - __auto_type * params = [[MTRDoorLockClusterLockDoorParams alloc] init]; - params.pinCode = [[NSData alloc] initWithBytes:"123458" length:6]; - [cluster lockDoorWithParams:params - completionHandler:^(NSError * _Nullable err) { - NSLog(@"TH sends Lock Door Command to the DUT with invalid PINCode Error: %@", err); - - VerifyOrReturn(CheckValue("status", - err ? ([err.domain isEqualToString:MTRInteractionErrorDomain] ? err.code : EMBER_ZCL_STATUS_FAILURE) : 0, - EMBER_ZCL_STATUS_FAILURE)); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR - TestThReadsUserCodeTemporaryDisableTimeAttributeFromDutAndAfterSending3FailureResponsesVerifyThatUserCodeTemporaryDisableTimeAttributeIsTriggered_24() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestThSendsLockCommandToTheDutWithValidPINCodeBeforeUserCodeTemporaryDisableTimeAttributeTimeExpires_25() - { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); - } - - CHIP_ERROR TestCleanTheCreatedUser_26() + CHIP_ERROR TestCleanTheCreatedUser_24() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -119530,7 +119478,7 @@ class Test_TC_DRLK_2_2 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestCleanupTheCreatedCredential_27() + CHIP_ERROR TestCleanupTheCreatedCredential_25() { MTRBaseDevice * device = GetDevice("alpha"); MTRBaseClusterDoorLock * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue];