From 4e0c3a57a293650350779fcb1a95c4e2003df3d0 Mon Sep 17 00:00:00 2001 From: manjunath-grl Date: Thu, 11 May 2023 21:22:28 +0530 Subject: [PATCH] Modified scripts TC-ACE-1.5 TC-BRBINFO-1.1 TC-SC-6.1 --- .../suites/certification/Test_TC_ACE_1_5.yaml | 33 ++ .../certification/Test_TC_BRBINFO_1_1.yaml | 61 +--- .../suites/certification/Test_TC_SC_6_1.yaml | 2 +- .../chip-tool/zap-generated/test/Commands.h | 189 ++++------ .../zap-generated/test/Commands.h | 322 +++++------------- 5 files changed, 207 insertions(+), 400 deletions(-) diff --git a/src/app/tests/suites/certification/Test_TC_ACE_1_5.yaml b/src/app/tests/suites/certification/Test_TC_ACE_1_5.yaml index 7e26b7982030fb..ff6b06f573fcd3 100644 --- a/src/app/tests/suites/certification/Test_TC_ACE_1_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_ACE_1_5.yaml @@ -52,10 +52,40 @@ tests: response: saveAs: th1FabricIndex + - label: + "Step 3 & 4: TH1 puts DUT into commissioning mode, TH2 commissions DUT + using admin node ID N2" + verification: | + Open a commissioning window On TH1(Chiptool)using below command + + ./chip-tool pairing open-commissioning-window 1 1 400 2000 3841 + + [1657186324.710951][10820:10825] CHIP:DMG: Received Command Response Status for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 Status=0x0 + [1657186324.710980][10820:10825] CHIP:CTL: Successfully opened pairing window On TH(Chiptool)e device + [1657186324.711048][10820:10825] CHIP:CTL: Manual pairing code: [36253605617] + [1657186324.711108][10820:10825] CHIP:CTL: SetupQRCode: [MT:-24J0IRV01A7TB7E700] + + + Commission TH2(Chiptool) to DUT using manualcode generated in TH1 using open commission window + + ./chip-tool pairing code 2 36253605617 --commissioner-name beta --commissioner-nodeid 223344 + [1657186359.584672][3509:3514] CHIP:CTL: Successfully finished commissioning step 'Cleanup' + [1657186359.584743][3509:3514] CHIP:TOO: Device commissioning completed with success + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP + arguments: + values: + - name: "message" + value: "Enter 'y' after success" + - name: "expectedValue" + value: "y" + - label: "Open Commissioning Window from alpha" cluster: "Administrator Commissioning" command: "OpenCommissioningWindow" timedInteractionTimeoutMs: 10000 + PICS: PICS_SDK_CI_ONLY arguments: values: - name: "CommissioningTimeout" @@ -72,6 +102,7 @@ tests: - label: "Waiting after opening commissioning window" cluster: "DelayCommands" command: "WaitForMs" + PICS: PICS_SDK_CI_ONLY arguments: values: - name: "ms" @@ -81,6 +112,7 @@ tests: identity: "beta" cluster: "CommissionerCommands" command: "PairWithCode" + PICS: PICS_SDK_CI_ONLY arguments: values: - name: "nodeId" @@ -92,6 +124,7 @@ tests: identity: beta cluster: "DelayCommands" command: "WaitForCommissionee" + PICS: PICS_SDK_CI_ONLY arguments: values: - name: "nodeId" diff --git a/src/app/tests/suites/certification/Test_TC_BRBINFO_1_1.yaml b/src/app/tests/suites/certification/Test_TC_BRBINFO_1_1.yaml index 22518b3e76fafd..34a9c2e31d741f 100644 --- a/src/app/tests/suites/certification/Test_TC_BRBINFO_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_BRBINFO_1_1.yaml @@ -186,52 +186,21 @@ tests: type: list contains: [18] - - label: "TH1 reads EventList from DUT" - PICS: " !BRBINFO.S.E00 && !BRBINFO.S.E01 && !BRBINFO.S.E02 && - !BRBINFO.S.E03 - " - command: "readAttribute" - attribute: "EventList" - response: - value: [] - constraints: - type: list - - - label: "TH1 reads optional event (StartUp) in EventList" - PICS: BRBINFO.S.E00 - command: "readAttribute" - attribute: "EventList" - response: - constraints: - type: list - contains: [0] - - - label: "TH1 reads optional event (ShutDown) in EventList" - PICS: BRBINFO.S.E01 - command: "readAttribute" - attribute: "EventList" - response: - constraints: - type: list - contains: [1] - - - label: "TH1 reads optional event (Leave) in EventList" - PICS: BRBINFO.S.E02 - command: "readAttribute" - attribute: "EventList" - response: - constraints: - type: list - contains: [2] - - - label: "TH1 reads optional event (ReachableChanged) in EventList" - PICS: BRBINFO.S.E03 - command: "readAttribute" - attribute: "EventList" - response: - constraints: - type: list - contains: [3] + #Commenting out the step EventList attribute which is out of scope for matter V1.0 + #- label: + # "Read EventList attribute from the DUT and Verify that the DUT + # response provides a list of supported events." + # verification: | + # Not implemented in chip-tool + # cluster: "LogCommands" + # command: "UserPrompt" + # PICS: PICS_USER_PROMPT + # arguments: + # values: + # - name: "message" + # value: "Please enter 'y' for success" + # - name: "expectedValue" + # value: "y" - label: "TH1 reads AcceptedCommandList from DUT" command: "readAttribute" diff --git a/src/app/tests/suites/certification/Test_TC_SC_6_1.yaml b/src/app/tests/suites/certification/Test_TC_SC_6_1.yaml index e413b92bea8668..3c369674678d3c 100644 --- a/src/app/tests/suites/certification/Test_TC_SC_6_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_SC_6_1.yaml @@ -146,7 +146,7 @@ tests: disabled: true - label: - "DUT binds GroupId with GroupKeySetID in the GroupKeyMap attribute + "DUT binds GroupID with GroupKeySetID in the GroupKeyMap attribute list on GroupKeyManagement cluster" PICS: GRPKEY.C.A0000 verification: | diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index 5caf34becbf382..b851fb764c5bb0 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -8577,7 +8577,7 @@ class Test_TC_ACE_1_1Suite : public TestCommand class Test_TC_ACE_1_5Suite : public TestCommand { public: - Test_TC_ACE_1_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACE_1_5", 17, credsIssuerConfig) + Test_TC_ACE_1_5Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_ACE_1_5", 18, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -8637,10 +8637,10 @@ class Test_TC_ACE_1_5Suite : public TestCommand break; case 2: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; break; case 3: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; break; case 4: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -8651,6 +8651,10 @@ class Test_TC_ACE_1_5Suite : public TestCommand shouldContinue = true; break; case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 7: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { uint8_t value; @@ -8658,7 +8662,7 @@ class Test_TC_ACE_1_5Suite : public TestCommand th2FabricIndex = value; } break; - case 7: + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeIdResponse::DecodableType value; @@ -8667,10 +8671,10 @@ class Test_TC_ACE_1_5Suite : public TestCommand } shouldContinue = true; break; - case 8: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 9: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeIdResponse::DecodableType value; @@ -8679,10 +8683,10 @@ class Test_TC_ACE_1_5Suite : public TestCommand } shouldContinue = true; break; - case 10: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 11: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList @@ -8690,23 +8694,23 @@ class Test_TC_ACE_1_5Suite : public TestCommand VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); } break; - case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); - break; case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); break; case 14: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); + break; + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::VendorId value; VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); } break; - case 15: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 16: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::OperationalCredentials::Commands::NOCResponse::DecodableType value; @@ -8741,7 +8745,18 @@ class Test_TC_ACE_1_5Suite : public TestCommand OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); } case 2: { - LogStep(2, "Open Commissioning Window from alpha"); + LogStep(2, "Step 3 & 4: TH1 puts DUT into commissioning mode, TH2 commissions DUT using admin node ID N2"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 3: { + LogStep(3, "Open Commissioning Window from alpha"); + VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::AdministratorCommissioning::Commands::OpenCommissioningWindow::Type value; value.commissioningTimeout = 180U; @@ -8763,41 +8778,44 @@ class Test_TC_ACE_1_5Suite : public TestCommand ); } - case 3: { - LogStep(3, "Waiting after opening commissioning window"); + case 4: { + LogStep(4, "Waiting after opening commissioning window"); + VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; value.ms = mWaitAfterCommissioning.HasValue() ? mWaitAfterCommissioning.Value() : 5000UL; return WaitForMs(kIdentityAlpha, value); } - case 4: { - LogStep(4, "Commission from TH2"); + case 5: { + LogStep(5, "Commission from TH2"); + VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; value.payload = mPayload.HasValue() ? mPayload.Value() : chip::Span("MT:-24J0AFN00KA0648G00", 22); return PairWithCode(kIdentityBeta, value); } - case 5: { - LogStep(5, "Wait for the commissioned device to be retrieved for TH2"); + case 6: { + LogStep(6, "Wait for the commissioned device to be retrieved for TH2"); + VerifyOrDo(!ShouldSkip("PICS_SDK_CI_ONLY"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; value.nodeId = mNodeId.HasValue() ? mNodeId.Value() : 305414945ULL; return WaitForCommissionee(kIdentityBeta, value); } - case 6: { - LogStep(6, "TH2 reads the fabric index"); + case 7: { + LogStep(7, "TH2 reads the fabric index"); return ReadAttribute(kIdentityBeta, GetEndpoint(0), OperationalCredentials::Id, OperationalCredentials::Attributes::CurrentFabricIndex::Id, true, chip::NullOptional); } - case 7: { - LogStep(7, "Read the commissioner node ID from the alpha fabric"); + case 8: { + LogStep(8, "Read the commissioner node ID from the alpha fabric"); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type value; return GetCommissionerNodeId(kIdentityAlpha, value); } - case 8: { - LogStep(8, "TH1 writes ACL giving view privilege for descriptor cluster"); + case 9: { + LogStep(9, "TH1 writes ACL giving view privilege for descriptor cluster"); ListFreer listFreer; chip::app::DataModel::List value; @@ -8865,14 +8883,14 @@ class Test_TC_ACE_1_5Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, chip::NullOptional, chip::NullOptional); } - case 9: { - LogStep(9, "Read the commissioner node ID from the beta fabric"); + case 10: { + LogStep(10, "Read the commissioner node ID from the beta fabric"); ListFreer listFreer; chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type value; return GetCommissionerNodeId(kIdentityBeta, value); } - case 10: { - LogStep(10, "TH2 writes ACL giving view privilge for basic cluster"); + case 11: { + LogStep(11, "TH2 writes ACL giving view privilge for basic cluster"); ListFreer listFreer; chip::app::DataModel::List value; @@ -8940,28 +8958,28 @@ class Test_TC_ACE_1_5Suite : public TestCommand return WriteAttribute(kIdentityBeta, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, chip::NullOptional, chip::NullOptional); } - case 11: { - LogStep(11, "TH1 reads descriptor cluster - expect SUCCESS"); + case 12: { + LogStep(12, "TH1 reads descriptor cluster - expect SUCCESS"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::DeviceTypeList::Id, true, chip::NullOptional); } - case 12: { - LogStep(12, "TH1 reads basic cluster - expect UNSUPPORTED_ACCESS"); + case 13: { + LogStep(13, "TH1 reads basic cluster - expect UNSUPPORTED_ACCESS"); return ReadAttribute(kIdentityAlpha, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::VendorID::Id, true, chip::NullOptional); } - case 13: { - LogStep(13, "TH2 reads descriptor cluster - expect UNSUPPORTED_ACCESS"); + case 14: { + LogStep(14, "TH2 reads descriptor cluster - expect UNSUPPORTED_ACCESS"); return ReadAttribute(kIdentityBeta, GetEndpoint(0), Descriptor::Id, Descriptor::Attributes::DeviceTypeList::Id, true, chip::NullOptional); } - case 14: { - LogStep(14, "TH2 reads basic cluster - expect SUCCESS"); + case 15: { + LogStep(15, "TH2 reads basic cluster - expect SUCCESS"); return ReadAttribute(kIdentityBeta, GetEndpoint(0), BasicInformation::Id, BasicInformation::Attributes::VendorID::Id, true, chip::NullOptional); } - case 15: { - LogStep(15, "TH1 resets ACL to default"); + case 16: { + LogStep(16, "TH1 resets ACL to default"); ListFreer listFreer; chip::app::DataModel::List value; @@ -8991,8 +9009,8 @@ class Test_TC_ACE_1_5Suite : public TestCommand return WriteAttribute(kIdentityAlpha, GetEndpoint(0), AccessControl::Id, AccessControl::Attributes::Acl::Id, value, chip::NullOptional, chip::NullOptional); } - case 16: { - LogStep(16, "TH1 sends RemoveFabric command for TH2"); + case 17: { + LogStep(17, "TH1 sends RemoveFabric command for TH2"); ListFreer listFreer; chip::app::Clusters::OperationalCredentials::Commands::RemoveFabric::Type value; value.fabricIndex = th2FabricIndex; @@ -9239,7 +9257,7 @@ class Test_TC_BRBINFO_1_1Suite : public TestCommand { public: Test_TC_BRBINFO_1_1Suite(CredentialIssuerCommands * credsIssuerConfig) : - TestCommand("Test_TC_BRBINFO_1_1", 25, credsIssuerConfig) + TestCommand("Test_TC_BRBINFO_1_1", 20, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -9435,54 +9453,6 @@ class Test_TC_BRBINFO_1_1Suite : public TestCommand } break; case 18: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - { - auto iter_0 = value.begin(); - VerifyOrReturn(CheckNoMoreListItems("eventList", iter_0, 0)); - } - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - } - break; - case 19: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 0UL)); - } - break; - case 20: - 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 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 2UL)); - } - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - { - chip::app::DataModel::DecodableList value; - VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); - VerifyOrReturn(CheckConstraintType("value", "list", "list")); - VerifyOrReturn(CheckConstraintContains("value", value, 3UL)); - } - break; - case 23: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -9494,7 +9464,7 @@ class Test_TC_BRBINFO_1_1Suite : public TestCommand VerifyOrReturn(CheckConstraintType("value", "list", "list")); } break; - case 24: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::DataModel::DecodableList value; @@ -9628,43 +9598,12 @@ class Test_TC_BRBINFO_1_1Suite : public TestCommand BridgedDeviceBasicInformation::Attributes::AttributeList::Id, true, chip::NullOptional); } case 18: { - LogStep(18, "TH1 reads EventList from DUT"); - VerifyOrDo(!ShouldSkip(" !BRBINFO.S.E00 && !BRBINFO.S.E01 && !BRBINFO.S.E02 && !BRBINFO.S.E03 "), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::EventList::Id, true, chip::NullOptional); - } - case 19: { - LogStep(19, "TH1 reads optional event (StartUp) in EventList"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.E00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::EventList::Id, true, chip::NullOptional); - } - case 20: { - LogStep(20, "TH1 reads optional event (ShutDown) in EventList"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.E01"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::EventList::Id, true, chip::NullOptional); - } - case 21: { - LogStep(21, "TH1 reads optional event (Leave) in EventList"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.E02"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::EventList::Id, true, chip::NullOptional); - } - case 22: { - LogStep(22, "TH1 reads optional event (ReachableChanged) in EventList"); - VerifyOrDo(!ShouldSkip("BRBINFO.S.E03"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); - return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, - BridgedDeviceBasicInformation::Attributes::EventList::Id, true, chip::NullOptional); - } - case 23: { - LogStep(23, "TH1 reads AcceptedCommandList from DUT"); + LogStep(18, "TH1 reads AcceptedCommandList from DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, BridgedDeviceBasicInformation::Attributes::AcceptedCommandList::Id, true, chip::NullOptional); } - case 24: { - LogStep(24, "TH1 reads GeneratedCommandList from DUT"); + case 19: { + LogStep(19, "TH1 reads GeneratedCommandList from DUT"); return ReadAttribute(kIdentityAlpha, GetEndpoint(3), BridgedDeviceBasicInformation::Id, BridgedDeviceBasicInformation::Attributes::GeneratedCommandList::Id, true, 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 e6106f2f9b2ca5..32342151f6f565 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -5602,64 +5602,90 @@ class Test_TC_ACE_1_5 : public TestCommandBridge { err = TestTh1ReadsTheFabricIndex_1(); break; case 2: - ChipLogProgress(chipTool, " ***** Test Step 2 : Open Commissioning Window from alpha\n"); - err = TestOpenCommissioningWindowFromAlpha_2(); + ChipLogProgress(chipTool, + " ***** Test Step 2 : Step 3 & 4: TH1 puts DUT into commissioning mode, TH2 commissions DUT using admin node ID " + "N2\n"); + if (ShouldSkip("PICS_SKIP_SAMPLE_APP")) { + NextTest(); + return; + } + err = TestStep34Th1PutsDutIntoCommissioningModeTh2CommissionsDutUsingAdminNodeIdN2_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : Waiting after opening commissioning window\n"); - err = TestWaitingAfterOpeningCommissioningWindow_3(); + ChipLogProgress(chipTool, " ***** Test Step 3 : Open Commissioning Window from alpha\n"); + if (ShouldSkip("PICS_SDK_CI_ONLY")) { + NextTest(); + return; + } + err = TestOpenCommissioningWindowFromAlpha_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : Commission from TH2\n"); - err = TestCommissionFromTh2_4(); + ChipLogProgress(chipTool, " ***** Test Step 4 : Waiting after opening commissioning window\n"); + if (ShouldSkip("PICS_SDK_CI_ONLY")) { + NextTest(); + return; + } + err = TestWaitingAfterOpeningCommissioningWindow_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : Wait for the commissioned device to be retrieved for TH2\n"); - err = TestWaitForTheCommissionedDeviceToBeRetrievedForTh2_5(); + ChipLogProgress(chipTool, " ***** Test Step 5 : Commission from TH2\n"); + if (ShouldSkip("PICS_SDK_CI_ONLY")) { + NextTest(); + return; + } + err = TestCommissionFromTh2_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH2 reads the fabric index\n"); - err = TestTh2ReadsTheFabricIndex_6(); + ChipLogProgress(chipTool, " ***** Test Step 6 : Wait for the commissioned device to be retrieved for TH2\n"); + if (ShouldSkip("PICS_SDK_CI_ONLY")) { + NextTest(); + return; + } + err = TestWaitForTheCommissionedDeviceToBeRetrievedForTh2_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : Read the commissioner node ID from the alpha fabric\n"); - err = TestReadTheCommissionerNodeIdFromTheAlphaFabric_7(); + ChipLogProgress(chipTool, " ***** Test Step 7 : TH2 reads the fabric index\n"); + err = TestTh2ReadsTheFabricIndex_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH1 writes ACL giving view privilege for descriptor cluster\n"); - err = TestTh1WritesAclGivingViewPrivilegeForDescriptorCluster_8(); + ChipLogProgress(chipTool, " ***** Test Step 8 : Read the commissioner node ID from the alpha fabric\n"); + err = TestReadTheCommissionerNodeIdFromTheAlphaFabric_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : Read the commissioner node ID from the beta fabric\n"); - err = TestReadTheCommissionerNodeIdFromTheBetaFabric_9(); + ChipLogProgress(chipTool, " ***** Test Step 9 : TH1 writes ACL giving view privilege for descriptor cluster\n"); + err = TestTh1WritesAclGivingViewPrivilegeForDescriptorCluster_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH2 writes ACL giving view privilge for basic cluster\n"); - err = TestTh2WritesAclGivingViewPrivilgeForBasicCluster_10(); + ChipLogProgress(chipTool, " ***** Test Step 10 : Read the commissioner node ID from the beta fabric\n"); + err = TestReadTheCommissionerNodeIdFromTheBetaFabric_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH1 reads descriptor cluster - expect SUCCESS\n"); - err = TestTh1ReadsDescriptorClusterExpectSuccess_11(); + ChipLogProgress(chipTool, " ***** Test Step 11 : TH2 writes ACL giving view privilge for basic cluster\n"); + err = TestTh2WritesAclGivingViewPrivilgeForBasicCluster_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH1 reads basic cluster - expect UNSUPPORTED_ACCESS\n"); - err = TestTh1ReadsBasicClusterExpectUnsupportedAccess_12(); + ChipLogProgress(chipTool, " ***** Test Step 12 : TH1 reads descriptor cluster - expect SUCCESS\n"); + err = TestTh1ReadsDescriptorClusterExpectSuccess_12(); break; case 13: - ChipLogProgress(chipTool, " ***** Test Step 13 : TH2 reads descriptor cluster - expect UNSUPPORTED_ACCESS\n"); - err = TestTh2ReadsDescriptorClusterExpectUnsupportedAccess_13(); + ChipLogProgress(chipTool, " ***** Test Step 13 : TH1 reads basic cluster - expect UNSUPPORTED_ACCESS\n"); + err = TestTh1ReadsBasicClusterExpectUnsupportedAccess_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : TH2 reads basic cluster - expect SUCCESS\n"); - err = TestTh2ReadsBasicClusterExpectSuccess_14(); + ChipLogProgress(chipTool, " ***** Test Step 14 : TH2 reads descriptor cluster - expect UNSUPPORTED_ACCESS\n"); + err = TestTh2ReadsDescriptorClusterExpectUnsupportedAccess_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH1 resets ACL to default\n"); - err = TestTh1ResetsAclToDefault_15(); + ChipLogProgress(chipTool, " ***** Test Step 15 : TH2 reads basic cluster - expect SUCCESS\n"); + err = TestTh2ReadsBasicClusterExpectSuccess_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : TH1 sends RemoveFabric command for TH2\n"); - err = TestTh1SendsRemoveFabricCommandForTh2_16(); + ChipLogProgress(chipTool, " ***** Test Step 16 : TH1 resets ACL to default\n"); + err = TestTh1ResetsAclToDefault_16(); + break; + case 17: + ChipLogProgress(chipTool, " ***** Test Step 17 : TH1 sends RemoveFabric command for TH2\n"); + err = TestTh1SendsRemoveFabricCommandForTh2_17(); break; } @@ -5709,13 +5735,13 @@ class Test_TC_ACE_1_5 : public TestCommandBridge { VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 12: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); break; case 14: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), EMBER_ZCL_STATUS_UNSUPPORTED_ACCESS)); break; case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -5723,6 +5749,9 @@ class Test_TC_ACE_1_5 : public TestCommandBridge { case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 17: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -5736,7 +5765,7 @@ class Test_TC_ACE_1_5 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 17; + const uint16_t mTestCount = 18; chip::Optional mNodeId; chip::Optional mCluster; @@ -5780,7 +5809,17 @@ class Test_TC_ACE_1_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestOpenCommissioningWindowFromAlpha_2() + CHIP_ERROR TestStep34Th1PutsDutIntoCommissioningModeTh2CommissionsDutUsingAdminNodeIdN2_2() + { + + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt("alpha", value); + } + + CHIP_ERROR TestOpenCommissioningWindowFromAlpha_3() { MTRBaseDevice * device = GetDevice("alpha"); @@ -5815,7 +5854,7 @@ class Test_TC_ACE_1_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestWaitingAfterOpeningCommissioningWindow_3() + CHIP_ERROR TestWaitingAfterOpeningCommissioningWindow_4() { chip::app::Clusters::DelayCommands::Commands::WaitForMs::Type value; @@ -5823,7 +5862,7 @@ class Test_TC_ACE_1_5 : public TestCommandBridge { return WaitForMs("alpha", value); } - CHIP_ERROR TestCommissionFromTh2_4() + CHIP_ERROR TestCommissionFromTh2_5() { chip::app::Clusters::CommissionerCommands::Commands::PairWithCode::Type value; @@ -5832,7 +5871,7 @@ class Test_TC_ACE_1_5 : public TestCommandBridge { return PairWithCode("beta", value); } - CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrievedForTh2_5() + CHIP_ERROR TestWaitForTheCommissionedDeviceToBeRetrievedForTh2_6() { chip::app::Clusters::DelayCommands::Commands::WaitForCommissionee::Type value; @@ -5841,7 +5880,7 @@ class Test_TC_ACE_1_5 : public TestCommandBridge { } NSNumber * _Nonnull th2FabricIndex; - CHIP_ERROR TestTh2ReadsTheFabricIndex_6() + CHIP_ERROR TestTh2ReadsTheFabricIndex_7() { MTRBaseDevice * device = GetDevice("beta"); @@ -5866,7 +5905,7 @@ class Test_TC_ACE_1_5 : public TestCommandBridge { } NSNumber * _Nonnull commissionerNodeIdAlpha; - CHIP_ERROR TestReadTheCommissionerNodeIdFromTheAlphaFabric_7() + CHIP_ERROR TestReadTheCommissionerNodeIdFromTheAlphaFabric_8() { chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type value; @@ -5878,7 +5917,7 @@ class Test_TC_ACE_1_5 : public TestCommandBridge { }); } - CHIP_ERROR TestTh1WritesAclGivingViewPrivilegeForDescriptorCluster_8() + CHIP_ERROR TestTh1WritesAclGivingViewPrivilegeForDescriptorCluster_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -5937,7 +5976,7 @@ class Test_TC_ACE_1_5 : public TestCommandBridge { } NSNumber * _Nonnull commissionerNodeIdBeta; - CHIP_ERROR TestReadTheCommissionerNodeIdFromTheBetaFabric_9() + CHIP_ERROR TestReadTheCommissionerNodeIdFromTheBetaFabric_10() { chip::app::Clusters::CommissionerCommands::Commands::GetCommissionerNodeId::Type value; @@ -5949,7 +5988,7 @@ class Test_TC_ACE_1_5 : public TestCommandBridge { }); } - CHIP_ERROR TestTh2WritesAclGivingViewPrivilgeForBasicCluster_10() + CHIP_ERROR TestTh2WritesAclGivingViewPrivilgeForBasicCluster_11() { MTRBaseDevice * device = GetDevice("beta"); @@ -6007,7 +6046,7 @@ class Test_TC_ACE_1_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTh1ReadsDescriptorClusterExpectSuccess_11() + CHIP_ERROR TestTh1ReadsDescriptorClusterExpectSuccess_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -6025,7 +6064,7 @@ class Test_TC_ACE_1_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTh1ReadsBasicClusterExpectUnsupportedAccess_12() + CHIP_ERROR TestTh1ReadsBasicClusterExpectUnsupportedAccess_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -6044,7 +6083,7 @@ class Test_TC_ACE_1_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTh2ReadsDescriptorClusterExpectUnsupportedAccess_13() + CHIP_ERROR TestTh2ReadsDescriptorClusterExpectUnsupportedAccess_14() { MTRBaseDevice * device = GetDevice("beta"); @@ -6063,7 +6102,7 @@ class Test_TC_ACE_1_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTh2ReadsBasicClusterExpectSuccess_14() + CHIP_ERROR TestTh2ReadsBasicClusterExpectSuccess_15() { MTRBaseDevice * device = GetDevice("beta"); @@ -6081,7 +6120,7 @@ class Test_TC_ACE_1_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTh1ResetsAclToDefault_15() + CHIP_ERROR TestTh1ResetsAclToDefault_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -6116,7 +6155,7 @@ class Test_TC_ACE_1_5 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTh1SendsRemoveFabricCommandForTh2_16() + CHIP_ERROR TestTh1SendsRemoveFabricCommandForTh2_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -6666,52 +6705,12 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { err = TestThReadsOptionalAttributeUniqueIDInAttributeList_17(); break; case 18: - ChipLogProgress(chipTool, " ***** Test Step 18 : TH1 reads EventList from DUT\n"); - if (ShouldSkip(" !BRBINFO.S.E00 && !BRBINFO.S.E01 && !BRBINFO.S.E02 && !BRBINFO.S.E03 ")) { - NextTest(); - return; - } - err = TestTh1ReadsEventListFromDut_18(); + ChipLogProgress(chipTool, " ***** Test Step 18 : TH1 reads AcceptedCommandList from DUT\n"); + err = TestTh1ReadsAcceptedCommandListFromDut_18(); break; case 19: - ChipLogProgress(chipTool, " ***** Test Step 19 : TH1 reads optional event (StartUp) in EventList\n"); - if (ShouldSkip("BRBINFO.S.E00")) { - NextTest(); - return; - } - err = TestTh1ReadsOptionalEventStartUpInEventList_19(); - break; - case 20: - ChipLogProgress(chipTool, " ***** Test Step 20 : TH1 reads optional event (ShutDown) in EventList\n"); - if (ShouldSkip("BRBINFO.S.E01")) { - NextTest(); - return; - } - err = TestTh1ReadsOptionalEventShutDownInEventList_20(); - break; - case 21: - ChipLogProgress(chipTool, " ***** Test Step 21 : TH1 reads optional event (Leave) in EventList\n"); - if (ShouldSkip("BRBINFO.S.E02")) { - NextTest(); - return; - } - err = TestTh1ReadsOptionalEventLeaveInEventList_21(); - break; - case 22: - ChipLogProgress(chipTool, " ***** Test Step 22 : TH1 reads optional event (ReachableChanged) in EventList\n"); - if (ShouldSkip("BRBINFO.S.E03")) { - NextTest(); - return; - } - err = TestTh1ReadsOptionalEventReachableChangedInEventList_22(); - break; - case 23: - ChipLogProgress(chipTool, " ***** Test Step 23 : TH1 reads AcceptedCommandList from DUT\n"); - err = TestTh1ReadsAcceptedCommandListFromDut_23(); - break; - case 24: - ChipLogProgress(chipTool, " ***** Test Step 24 : TH1 reads GeneratedCommandList from DUT\n"); - err = TestTh1ReadsGeneratedCommandListFromDut_24(); + ChipLogProgress(chipTool, " ***** Test Step 19 : TH1 reads GeneratedCommandList from DUT\n"); + err = TestTh1ReadsGeneratedCommandListFromDut_19(); break; } @@ -6784,21 +6783,6 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 20: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 21: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 22: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 23: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; - case 24: - VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - break; } // Go on to the next test. @@ -6812,7 +6796,7 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 25; + const uint16_t mTestCount = 20; chip::Optional mNodeId; chip::Optional mCluster; @@ -7229,125 +7213,7 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTh1ReadsEventListFromDut_18() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(3) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH1 reads EventList from DUT Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - { - id actualValue = value; - VerifyOrReturn(CheckValue("EventList", [actualValue count], static_cast(0))); - } - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestTh1ReadsOptionalEventStartUpInEventList_19() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(3) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH1 reads optional event (StartUp) in EventList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 0UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestTh1ReadsOptionalEventShutDownInEventList_20() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(3) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH1 reads optional event (ShutDown) in EventList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 1UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestTh1ReadsOptionalEventLeaveInEventList_21() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(3) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH1 reads optional event (Leave) in EventList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 2UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestTh1ReadsOptionalEventReachableChangedInEventList_22() - { - - MTRBaseDevice * device = GetDevice("alpha"); - __auto_type * cluster = [[MTRBaseClusterBridgedDeviceBasicInformation alloc] initWithDevice:device - endpointID:@(3) - queue:mCallbackQueue]; - VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); - - [cluster readAttributeEventListWithCompletion:^(NSArray * _Nullable value, NSError * _Nullable err) { - NSLog(@"TH1 reads optional event (ReachableChanged) in EventList Error: %@", err); - - VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); - - VerifyOrReturn(CheckConstraintType("eventList", "list", "list")); - VerifyOrReturn(CheckConstraintContains("eventList", value, 3UL)); - - NextTest(); - }]; - - return CHIP_NO_ERROR; - } - - CHIP_ERROR TestTh1ReadsAcceptedCommandListFromDut_23() + CHIP_ERROR TestTh1ReadsAcceptedCommandListFromDut_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -7373,7 +7239,7 @@ class Test_TC_BRBINFO_1_1 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestTh1ReadsGeneratedCommandListFromDut_24() + CHIP_ERROR TestTh1ReadsGeneratedCommandListFromDut_19() { MTRBaseDevice * device = GetDevice("alpha");