From 39f33d16c7f93afc83d149b3e41d7e542a933323 Mon Sep 17 00:00:00 2001 From: Ricardo Casallas Date: Fri, 25 Mar 2022 14:03:04 -0400 Subject: [PATCH] GroupKeyManagement cluster: YAML test added. --- .../suites/TestGroupKeyManagementCluster.yaml | 8 + .../Framework/CHIPTests/CHIPClustersTests.m | 45 ++++- .../zap-generated/test/Commands.h | 83 ++++++--- .../chip-tool/zap-generated/test/Commands.h | 174 +++++++++++------- 4 files changed, 215 insertions(+), 95 deletions(-) diff --git a/src/app/tests/suites/TestGroupKeyManagementCluster.yaml b/src/app/tests/suites/TestGroupKeyManagementCluster.yaml index 2fe4ff9b624844..4164bb70d80bfb 100644 --- a/src/app/tests/suites/TestGroupKeyManagementCluster.yaml +++ b/src/app/tests/suites/TestGroupKeyManagementCluster.yaml @@ -148,6 +148,14 @@ tests: { FabricIndex: 1, GroupId: 0x0102, GroupKeySetID: 0x01a2 }, ] + - label: "Write Group Keys (invalid)" + command: "writeAttribute" + attribute: "GroupKeyMap" + arguments: + value: [{ FabricIndex: 1, GroupId: 0x0102, GroupKeySetID: 0 }] + response: + error: 0x87 + - label: "Read Group Keys" command: "readAttribute" attribute: "GroupKeyMap" diff --git a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m index f169fd959ae3e9..a5acacf1dfd3c2 100644 --- a/src/darwin/Framework/CHIPTests/CHIPClustersTests.m +++ b/src/darwin/Framework/CHIPTests/CHIPClustersTests.m @@ -47654,7 +47654,36 @@ - (void)testSendClusterTestGroupKeyManagementCluster_000008_WriteAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestGroupKeyManagementCluster_000009_ReadAttribute +- (void)testSendClusterTestGroupKeyManagementCluster_000009_WriteAttribute +{ + XCTestExpectation * expectation = [self expectationWithDescription:@"Write Group Keys (invalid)"]; + + CHIPDevice * device = GetConnectedDevice(); + dispatch_queue_t queue = dispatch_get_main_queue(); + CHIPTestGroupKeyManagement * cluster = [[CHIPTestGroupKeyManagement alloc] initWithDevice:device endpoint:0 queue:queue]; + XCTAssertNotNil(cluster); + + id groupKeyMapArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[CHIPGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; + ((CHIPGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupId = [NSNumber numberWithUnsignedShort:258U]; + ((CHIPGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupKeySetID = [NSNumber numberWithUnsignedShort:0U]; + ((CHIPGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1]; + + groupKeyMapArgument = temp_0; + } + [cluster writeAttributeGroupKeyMapWithValue:groupKeyMapArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write Group Keys (invalid) Error: %@", err); + + XCTAssertEqual([CHIPErrorTestUtils errorToZCLErrorCode:err], EMBER_ZCL_STATUS_NOT_FOUND); + [expectation fulfill]; + }]; + + [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; +} +- (void)testSendClusterTestGroupKeyManagementCluster_000010_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read Group Keys"]; @@ -47699,7 +47728,7 @@ - (void)testSendClusterTestGroupKeyManagementCluster_000009_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestGroupKeyManagementCluster_000010_ReadAttribute +- (void)testSendClusterTestGroupKeyManagementCluster_000011_ReadAttribute { XCTestExpectation * expectation = [self expectationWithDescription:@"Read GroupTable"]; @@ -47742,7 +47771,7 @@ - (void)testSendClusterTestGroupKeyManagementCluster_000010_ReadAttribute [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestGroupKeyManagementCluster_000011_KeySetRemove +- (void)testSendClusterTestGroupKeyManagementCluster_000012_KeySetRemove { XCTestExpectation * expectation = [self expectationWithDescription:@"KeySet Remove 1"]; @@ -47764,7 +47793,7 @@ - (void)testSendClusterTestGroupKeyManagementCluster_000011_KeySetRemove [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestGroupKeyManagementCluster_000012_KeySetRead +- (void)testSendClusterTestGroupKeyManagementCluster_000013_KeySetRead { XCTestExpectation * expectation = [self expectationWithDescription:@"KeySet Read (removed)"]; @@ -47786,7 +47815,7 @@ - (void)testSendClusterTestGroupKeyManagementCluster_000012_KeySetRead [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestGroupKeyManagementCluster_000013_KeySetRead +- (void)testSendClusterTestGroupKeyManagementCluster_000014_KeySetRead { XCTestExpectation * expectation = [self expectationWithDescription:@"KeySet Read (not removed)"]; @@ -47833,7 +47862,7 @@ - (void)testSendClusterTestGroupKeyManagementCluster_000013_KeySetRead [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestGroupKeyManagementCluster_000014_RemoveAllGroups +- (void)testSendClusterTestGroupKeyManagementCluster_000015_RemoveAllGroups { XCTestExpectation * expectation = [self expectationWithDescription:@"Remove All"]; @@ -47852,7 +47881,7 @@ - (void)testSendClusterTestGroupKeyManagementCluster_000014_RemoveAllGroups [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestGroupKeyManagementCluster_000015_KeySetRemove +- (void)testSendClusterTestGroupKeyManagementCluster_000016_KeySetRemove { XCTestExpectation * expectation = [self expectationWithDescription:@"KeySet Remove 2"]; @@ -47874,7 +47903,7 @@ - (void)testSendClusterTestGroupKeyManagementCluster_000015_KeySetRemove [self waitForExpectationsWithTimeout:kTimeoutInSeconds handler:nil]; } -- (void)testSendClusterTestGroupKeyManagementCluster_000016_KeySetRead +- (void)testSendClusterTestGroupKeyManagementCluster_000017_KeySetRead { XCTestExpectation * expectation = [self expectationWithDescription:@"KeySet Read (also removed)"]; diff --git a/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h b/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h index 7360214a6abd09..196612ac70402a 100644 --- a/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool-darwin/zap-generated/test/Commands.h @@ -53986,36 +53986,40 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { err = TestWriteGroupKeys_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read Group Keys\n"); - err = TestReadGroupKeys_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Write Group Keys (invalid)\n"); + err = TestWriteGroupKeysInvalid_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Read GroupTable\n"); - err = TestReadGroupTable_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Read Group Keys\n"); + err = TestReadGroupKeys_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : KeySet Remove 1\n"); - err = TestKeySetRemove1_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Read GroupTable\n"); + err = TestReadGroupTable_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : KeySet Read (removed)\n"); - err = TestKeySetReadRemoved_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : KeySet Remove 1\n"); + err = TestKeySetRemove1_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : KeySet Read (not removed)\n"); - err = TestKeySetReadNotRemoved_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : KeySet Read (removed)\n"); + err = TestKeySetReadRemoved_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Remove All\n"); - err = TestRemoveAll_14(); + ChipLogProgress(chipTool, " ***** Test Step 14 : KeySet Read (not removed)\n"); + err = TestKeySetReadNotRemoved_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : KeySet Remove 2\n"); - err = TestKeySetRemove2_15(); + ChipLogProgress(chipTool, " ***** Test Step 15 : Remove All\n"); + err = TestRemoveAll_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : KeySet Read (also removed)\n"); - err = TestKeySetReadAlsoRemoved_16(); + ChipLogProgress(chipTool, " ***** Test Step 16 : KeySet Remove 2\n"); + err = TestKeySetRemove2_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : KeySet Read (also removed)\n"); + err = TestKeySetReadAlsoRemoved_17(); break; } @@ -54032,7 +54036,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 17; + const uint16_t mTestCount = 18; chip::Optional mNodeId; chip::Optional mCluster; @@ -54317,7 +54321,36 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupKeys_9() + CHIP_ERROR TestWriteGroupKeysInvalid_9() + { + CHIPDevice * device = GetConnectedDevice(); + CHIPTestGroupKeyManagement * cluster = [[CHIPTestGroupKeyManagement alloc] initWithDevice:device + endpoint:0 + queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + id groupKeyMapArgument; + { + NSMutableArray * temp_0 = [[NSMutableArray alloc] init]; + temp_0[0] = [[CHIPGroupKeyManagementClusterGroupKeyMapStruct alloc] init]; + ((CHIPGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupId = [NSNumber numberWithUnsignedShort:258U]; + ((CHIPGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).groupKeySetID = [NSNumber numberWithUnsignedShort:0U]; + ((CHIPGroupKeyManagementClusterGroupKeyMapStruct *) temp_0[0]).fabricIndex = [NSNumber numberWithUnsignedChar:1]; + + groupKeyMapArgument = temp_0; + } + [cluster writeAttributeGroupKeyMapWithValue:groupKeyMapArgument + completionHandler:^(NSError * _Nullable err) { + NSLog(@"Write Group Keys (invalid) Error: %@", err); + + VerifyOrReturn(CheckValue("status", err, 135)); + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestReadGroupKeys_10() { CHIPDevice * device = GetConnectedDevice(); CHIPTestGroupKeyManagement * cluster = [[CHIPTestGroupKeyManagement alloc] initWithDevice:device @@ -54357,7 +54390,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestReadGroupTable_10() + CHIP_ERROR TestReadGroupTable_11() { CHIPDevice * device = GetConnectedDevice(); CHIPTestGroupKeyManagement * cluster = [[CHIPTestGroupKeyManagement alloc] initWithDevice:device @@ -54398,7 +54431,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetRemove1_11() + CHIP_ERROR TestKeySetRemove1_12() { CHIPDevice * device = GetConnectedDevice(); CHIPTestGroupKeyManagement * cluster = [[CHIPTestGroupKeyManagement alloc] initWithDevice:device @@ -54420,7 +54453,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetReadRemoved_12() + CHIP_ERROR TestKeySetReadRemoved_13() { CHIPDevice * device = GetConnectedDevice(); CHIPTestGroupKeyManagement * cluster = [[CHIPTestGroupKeyManagement alloc] initWithDevice:device @@ -54442,7 +54475,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetReadNotRemoved_13() + CHIP_ERROR TestKeySetReadNotRemoved_14() { CHIPDevice * device = GetConnectedDevice(); CHIPTestGroupKeyManagement * cluster = [[CHIPTestGroupKeyManagement alloc] initWithDevice:device @@ -54492,7 +54525,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestRemoveAll_14() + CHIP_ERROR TestRemoveAll_15() { CHIPDevice * device = GetConnectedDevice(); CHIPTestGroups * cluster = [[CHIPTestGroups alloc] initWithDevice:device endpoint:1 queue:mCallbackQueue]; @@ -54509,7 +54542,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetRemove2_15() + CHIP_ERROR TestKeySetRemove2_16() { CHIPDevice * device = GetConnectedDevice(); CHIPTestGroupKeyManagement * cluster = [[CHIPTestGroupKeyManagement alloc] initWithDevice:device @@ -54531,7 +54564,7 @@ class TestGroupKeyManagementCluster : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestKeySetReadAlsoRemoved_16() + CHIP_ERROR TestKeySetReadAlsoRemoved_17() { CHIPDevice * device = GetConnectedDevice(); CHIPTestGroupKeyManagement * cluster = [[CHIPTestGroupKeyManagement alloc] initWithDevice:device diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 88bbb0d2dc9c38..c911287182adf3 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -103363,36 +103363,40 @@ class TestGroupKeyManagementClusterSuite : public TestCommand err = TestWriteGroupKeys_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read Group Keys\n"); - err = TestReadGroupKeys_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : Write Group Keys (invalid)\n"); + err = TestWriteGroupKeysInvalid_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : Read GroupTable\n"); - err = TestReadGroupTable_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Read Group Keys\n"); + err = TestReadGroupKeys_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : KeySet Remove 1\n"); - err = TestKeySetRemove1_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : Read GroupTable\n"); + err = TestReadGroupTable_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : KeySet Read (removed)\n"); - err = TestKeySetReadRemoved_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : KeySet Remove 1\n"); + err = TestKeySetRemove1_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : KeySet Read (not removed)\n"); - err = TestKeySetReadNotRemoved_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : KeySet Read (removed)\n"); + err = TestKeySetReadRemoved_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : Remove All\n"); - err = TestRemoveAll_14(); + ChipLogProgress(chipTool, " ***** Test Step 14 : KeySet Read (not removed)\n"); + err = TestKeySetReadNotRemoved_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : KeySet Remove 2\n"); - err = TestKeySetRemove2_15(); + ChipLogProgress(chipTool, " ***** Test Step 15 : Remove All\n"); + err = TestRemoveAll_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : KeySet Read (also removed)\n"); - err = TestKeySetReadAlsoRemoved_16(); + ChipLogProgress(chipTool, " ***** Test Step 16 : KeySet Remove 2\n"); + err = TestKeySetRemove2_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : KeySet Read (also removed)\n"); + err = TestKeySetReadAlsoRemoved_17(); break; } @@ -103410,7 +103414,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 17; + const uint16_t mTestCount = 18; chip::Optional mNodeId; chip::Optional mCluster; @@ -103460,12 +103464,9 @@ class TestGroupKeyManagementClusterSuite : public TestCommand (static_cast(context))->OnFailureResponse_9(error); } - static void - OnSuccessCallback_9(void * context, - const chip::app::DataModel::DecodableList< - chip::app::Clusters::GroupKeyManagement::Structs::GroupKeyMapStruct::DecodableType> & groupKeyMap) + static void OnSuccessCallback_9(void * context) { - (static_cast(context))->OnSuccessResponse_9(groupKeyMap); + (static_cast(context))->OnSuccessResponse_9(); } static void OnFailureCallback_10(void * context, CHIP_ERROR error) @@ -103475,10 +103476,23 @@ class TestGroupKeyManagementClusterSuite : public TestCommand static void OnSuccessCallback_10(void * context, + const chip::app::DataModel::DecodableList< + chip::app::Clusters::GroupKeyManagement::Structs::GroupKeyMapStruct::DecodableType> & groupKeyMap) + { + (static_cast(context))->OnSuccessResponse_10(groupKeyMap); + } + + static void OnFailureCallback_11(void * context, CHIP_ERROR error) + { + (static_cast(context))->OnFailureResponse_11(error); + } + + static void + OnSuccessCallback_11(void * context, const chip::app::DataModel::DecodableList< chip::app::Clusters::GroupKeyManagement::Structs::GroupInfoMapStruct::DecodableType> & groupTable) { - (static_cast(context))->OnSuccessResponse_10(groupTable); + (static_cast(context))->OnSuccessResponse_11(groupTable); } // @@ -103799,14 +103813,31 @@ class TestGroupKeyManagementClusterSuite : public TestCommand void OnSuccessResponse_8() { NextTest(); } - CHIP_ERROR TestReadGroupKeys_9() + CHIP_ERROR TestWriteGroupKeysInvalid_9() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::GroupKeyManagementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); - ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_9, OnFailureCallback_9, true)); + ListFreer listFreer; + chip::app::DataModel::List + groupKeyMapArgument; + + { + auto * listHolder_0 = new ListHolder(1); + listFreer.add(listHolder_0); + + listHolder_0->mList[0].groupId = 258U; + listHolder_0->mList[0].groupKeySetID = 0U; + listHolder_0->mList[0].fabricIndex = 1; + + groupKeyMapArgument = + chip::app::DataModel::List( + listHolder_0->mList, 1); + } + + ReturnErrorOnFailure(cluster.WriteAttribute( + groupKeyMapArgument, this, OnSuccessCallback_9, OnFailureCallback_9)); return CHIP_NO_ERROR; } @@ -103816,8 +103847,27 @@ class TestGroupKeyManagementClusterSuite : public TestCommand ThrowFailureResponse(); } - void OnSuccessResponse_9(const chip::app::DataModel::DecodableList< - chip::app::Clusters::GroupKeyManagement::Structs::GroupKeyMapStruct::DecodableType> & groupKeyMap) + void OnSuccessResponse_9() { NextTest(); } + + CHIP_ERROR TestReadGroupKeys_10() + { + const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; + chip::Controller::GroupKeyManagementClusterTest cluster; + cluster.Associate(mDevices[kIdentityAlpha], endpoint); + + ReturnErrorOnFailure(cluster.ReadAttribute( + this, OnSuccessCallback_10, OnFailureCallback_10, true)); + return CHIP_NO_ERROR; + } + + void OnFailureResponse_10(CHIP_ERROR error) + { + chip::app::StatusIB status(error); + ThrowFailureResponse(); + } + + void OnSuccessResponse_10(const chip::app::DataModel::DecodableList< + chip::app::Clusters::GroupKeyManagement::Structs::GroupKeyMapStruct::DecodableType> & groupKeyMap) { { auto iter_0 = groupKeyMap.begin(); @@ -103835,24 +103885,24 @@ class TestGroupKeyManagementClusterSuite : public TestCommand NextTest(); } - CHIP_ERROR TestReadGroupTable_10() + CHIP_ERROR TestReadGroupTable_11() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; chip::Controller::GroupKeyManagementClusterTest cluster; cluster.Associate(mDevices[kIdentityAlpha], endpoint); ReturnErrorOnFailure(cluster.ReadAttribute( - this, OnSuccessCallback_10, OnFailureCallback_10, true)); + this, OnSuccessCallback_11, OnFailureCallback_11, true)); return CHIP_NO_ERROR; } - void OnFailureResponse_10(CHIP_ERROR error) + void OnFailureResponse_11(CHIP_ERROR error) { chip::app::StatusIB status(error); ThrowFailureResponse(); } - void OnSuccessResponse_10(const chip::app::DataModel::DecodableList< + void OnSuccessResponse_11(const chip::app::DataModel::DecodableList< chip::app::Clusters::GroupKeyManagement::Structs::GroupInfoMapStruct::DecodableType> & groupTable) { { @@ -103875,7 +103925,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand NextTest(); } - CHIP_ERROR TestKeySetRemove1_11() + CHIP_ERROR TestKeySetRemove1_12() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; using RequestType = chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type; @@ -103884,26 +103934,26 @@ class TestGroupKeyManagementClusterSuite : public TestCommand request.groupKeySetID = 417U; auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_11(); + (static_cast(context))->OnSuccessResponse_12(); }; auto failure = [](void * context, CHIP_ERROR error) { - (static_cast(context))->OnFailureResponse_11(error); + (static_cast(context))->OnFailureResponse_12(error); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_11(CHIP_ERROR error) + void OnFailureResponse_12(CHIP_ERROR error) { chip::app::StatusIB status(error); ThrowFailureResponse(); } - void OnSuccessResponse_11() { NextTest(); } + void OnSuccessResponse_12() { NextTest(); } - CHIP_ERROR TestKeySetReadRemoved_12() + CHIP_ERROR TestKeySetReadRemoved_13() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; using RequestType = chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type; @@ -103912,18 +103962,18 @@ class TestGroupKeyManagementClusterSuite : public TestCommand request.groupKeySetID = 417U; auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_12(data.groupKeySet); + (static_cast(context))->OnSuccessResponse_13(data.groupKeySet); }; auto failure = [](void * context, CHIP_ERROR error) { - (static_cast(context))->OnFailureResponse_12(error); + (static_cast(context))->OnFailureResponse_13(error); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_12(CHIP_ERROR error) + void OnFailureResponse_13(CHIP_ERROR error) { chip::app::StatusIB status(error); VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); @@ -103931,12 +103981,12 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } void - OnSuccessResponse_12(const chip::app::Clusters::GroupKeyManagement::Structs::GroupKeySetStruct::DecodableType & groupKeySet) + OnSuccessResponse_13(const chip::app::Clusters::GroupKeyManagement::Structs::GroupKeySetStruct::DecodableType & groupKeySet) { ThrowSuccessResponse(); } - CHIP_ERROR TestKeySetReadNotRemoved_13() + CHIP_ERROR TestKeySetReadNotRemoved_14() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; using RequestType = chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type; @@ -103945,25 +103995,25 @@ class TestGroupKeyManagementClusterSuite : public TestCommand request.groupKeySetID = 418U; auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_13(data.groupKeySet); + (static_cast(context))->OnSuccessResponse_14(data.groupKeySet); }; auto failure = [](void * context, CHIP_ERROR error) { - (static_cast(context))->OnFailureResponse_13(error); + (static_cast(context))->OnFailureResponse_14(error); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_13(CHIP_ERROR error) + void OnFailureResponse_14(CHIP_ERROR error) { chip::app::StatusIB status(error); ThrowFailureResponse(); } void - OnSuccessResponse_13(const chip::app::Clusters::GroupKeyManagement::Structs::GroupKeySetStruct::DecodableType & groupKeySet) + OnSuccessResponse_14(const chip::app::Clusters::GroupKeyManagement::Structs::GroupKeySetStruct::DecodableType & groupKeySet) { VerifyOrReturn(CheckValue("groupKeySet.groupKeySetID", groupKeySet.groupKeySetID, 418U)); VerifyOrReturn(CheckValue("groupKeySet.groupKeySecurityPolicy", groupKeySet.groupKeySecurityPolicy, 1)); @@ -103980,7 +104030,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand NextTest(); } - CHIP_ERROR TestRemoveAll_14() + CHIP_ERROR TestRemoveAll_15() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 1; using RequestType = chip::app::Clusters::Groups::Commands::RemoveAllGroups::Type; @@ -103988,26 +104038,26 @@ class TestGroupKeyManagementClusterSuite : public TestCommand RequestType request; auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_14(); + (static_cast(context))->OnSuccessResponse_15(); }; auto failure = [](void * context, CHIP_ERROR error) { - (static_cast(context))->OnFailureResponse_14(error); + (static_cast(context))->OnFailureResponse_15(error); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_14(CHIP_ERROR error) + void OnFailureResponse_15(CHIP_ERROR error) { chip::app::StatusIB status(error); ThrowFailureResponse(); } - void OnSuccessResponse_14() { NextTest(); } + void OnSuccessResponse_15() { NextTest(); } - CHIP_ERROR TestKeySetRemove2_15() + CHIP_ERROR TestKeySetRemove2_16() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; using RequestType = chip::app::Clusters::GroupKeyManagement::Commands::KeySetRemove::Type; @@ -104016,26 +104066,26 @@ class TestGroupKeyManagementClusterSuite : public TestCommand request.groupKeySetID = 418U; auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_15(); + (static_cast(context))->OnSuccessResponse_16(); }; auto failure = [](void * context, CHIP_ERROR error) { - (static_cast(context))->OnFailureResponse_15(error); + (static_cast(context))->OnFailureResponse_16(error); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_15(CHIP_ERROR error) + void OnFailureResponse_16(CHIP_ERROR error) { chip::app::StatusIB status(error); ThrowFailureResponse(); } - void OnSuccessResponse_15() { NextTest(); } + void OnSuccessResponse_16() { NextTest(); } - CHIP_ERROR TestKeySetReadAlsoRemoved_16() + CHIP_ERROR TestKeySetReadAlsoRemoved_17() { const chip::EndpointId endpoint = mEndpoint.HasValue() ? mEndpoint.Value() : 0; using RequestType = chip::app::Clusters::GroupKeyManagement::Commands::KeySetRead::Type; @@ -104044,18 +104094,18 @@ class TestGroupKeyManagementClusterSuite : public TestCommand request.groupKeySetID = 418U; auto success = [](void * context, const typename RequestType::ResponseType & data) { - (static_cast(context))->OnSuccessResponse_16(data.groupKeySet); + (static_cast(context))->OnSuccessResponse_17(data.groupKeySet); }; auto failure = [](void * context, CHIP_ERROR error) { - (static_cast(context))->OnFailureResponse_16(error); + (static_cast(context))->OnFailureResponse_17(error); }; ReturnErrorOnFailure(chip::Controller::InvokeCommand(mDevices[kIdentityAlpha], this, success, failure, endpoint, request)); return CHIP_NO_ERROR; } - void OnFailureResponse_16(CHIP_ERROR error) + void OnFailureResponse_17(CHIP_ERROR error) { chip::app::StatusIB status(error); VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_NOT_FOUND)); @@ -104063,7 +104113,7 @@ class TestGroupKeyManagementClusterSuite : public TestCommand } void - OnSuccessResponse_16(const chip::app::Clusters::GroupKeyManagement::Structs::GroupKeySetStruct::DecodableType & groupKeySet) + OnSuccessResponse_17(const chip::app::Clusters::GroupKeyManagement::Structs::GroupKeySetStruct::DecodableType & groupKeySet) { ThrowSuccessResponse(); }