diff --git a/zzz_generated/chip-tool/zap-generated/test/Commands.h b/zzz_generated/chip-tool/zap-generated/test/Commands.h index ea8348cb0a492e..f91c2ca1a49d67 100644 --- a/zzz_generated/chip-tool/zap-generated/test/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/test/Commands.h @@ -11886,7 +11886,7 @@ class Test_TC_CC_2_1Suite : public TestCommand } case 7: { LogStep(7, "TH reads CompensationText attribute from DUT"); - VerifyOrDo(!ShouldSkip("CC.S.A0005"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("CC.S.A0006"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), ColorControl::Id, ColorControl::Attributes::CompensationText::Id, true, chip::NullOptional); } @@ -83437,7 +83437,7 @@ class Test_TC_DRLK_2_3Suite : public TestCommand LogStep(6, "TH writes the RequirePINforRemoteOperation attribute value as False on the DUT and Verify DUT responds with " "UNSUPPORTED_WRITE"); - VerifyOrDo(!ShouldSkip("DRLK.S.F07 && DRLK.S.F00 && ! DRLK.S.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("DRLK.S.F07 && DRLK.S.F00 && !DRLK.S.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; bool value; value = false; @@ -83487,7 +83487,7 @@ class Test_TC_DRLK_2_3Suite : public TestCommand LogStep(11, "TH writes the RequirePINforRemoteOperation attribute value as False on the DUT and Verify DUT responds with " "UNSUPPORTED_WRITE"); - VerifyOrDo(!ShouldSkip("DRLK.S.F07 && DRLK.S.F00 && ! DRLK.S.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("DRLK.S.F07 && DRLK.S.F00 && !DRLK.S.A0033"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; bool value; value = true; @@ -83629,7 +83629,7 @@ class Test_TC_DRLK_2_3Suite : public TestCommand } case 24: { LogStep(24, "TH reads the UserCodeTemporaryDisableTime attribute from the DUT and check attribute is triggered"); - VerifyOrDo(!ShouldSkip("DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("DRLK.S.F00 && DRLK.S.F01 && DRLK.S.A0031"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::UserCodeTemporaryDisableTime::Id, true, chip::NullOptional); } @@ -85166,7 +85166,14 @@ class Test_TC_DRLK_2_9Suite : public TestCommand break; case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); - shouldContinue = true; + { + chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckValue("status", value.status, 3U)); + VerifyOrReturn(CheckValueNull("userIndex", value.userIndex)); + VerifyOrReturn(CheckValueNonNull("nextCredentialIndex", value.nextCredentialIndex)); + VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); + } break; case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); @@ -85403,11 +85410,21 @@ class Test_TC_DRLK_2_9Suite : public TestCommand VerifyOrDo(!ShouldSkip("PICS_USER_PROMPT && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt(kIdentityAlpha, value); + chip::app::Clusters::DoorLock::Commands::SetCredential::Type value; + value.operationType = static_cast(2); + + value.credential.credentialType = static_cast(1); + value.credential.credentialIndex = 3U; + + value.credentialData = chip::ByteSpan(chip::Uint8::from_const_char("1234567garbage: not in length on purpose"), 7); + value.userIndex.SetNonNull(); + value.userIndex.Value() = 1U; + value.userStatus.SetNull(); + value.userType.SetNull(); + return SendCommand(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Commands::SetCredential::Id, value, + chip::Optional(10000), chip::NullOptional + + ); } case 11: { LogStep(11, "TH sends Clear Credential Command to DUT"); @@ -85426,8 +85443,7 @@ class Test_TC_DRLK_2_9Suite : public TestCommand } case 12: { LogStep(12, "TH sends Get Credential Status Command to DUT"); - VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C24.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; @@ -85499,8 +85515,7 @@ class Test_TC_DRLK_2_9Suite : public TestCommand } case 16: { LogStep(16, "TH sends Get Credential Status Command"); - VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.C24.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; @@ -85570,7 +85585,7 @@ class Test_TC_DRLK_2_9Suite : public TestCommand class Test_TC_DRLK_2_11Suite : public TestCommand { public: - Test_TC_DRLK_2_11Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DRLK_2_11", 18, credsIssuerConfig) + Test_TC_DRLK_2_11Suite(CredentialIssuerCommands * credsIssuerConfig) : TestCommand("Test_TC_DRLK_2_11", 23, credsIssuerConfig) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -85639,6 +85654,51 @@ class Test_TC_DRLK_2_11Suite : public TestCommand } break; case 3: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint16_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 65535U)); + } + break; + case 4: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); + } + break; + case 5: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); + } + break; + case 6: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); + } + break; + case 7: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + { + uint8_t value; + VerifyOrReturn(CheckDecodeValue(chip::app::DataModel::Decode(*data, value))); + VerifyOrReturn(CheckConstraintMinValue("value", value, 0U)); + VerifyOrReturn(CheckConstraintMaxValue("value", value, 255U)); + } + break; + case 8: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; @@ -85649,7 +85709,7 @@ class Test_TC_DRLK_2_11Suite : public TestCommand VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); } break; - case 4: + case 9: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; @@ -85660,7 +85720,7 @@ class Test_TC_DRLK_2_11Suite : public TestCommand VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); } break; - case 5: + case 10: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::SetCredentialResponse::DecodableType value; @@ -85671,7 +85731,7 @@ class Test_TC_DRLK_2_11Suite : public TestCommand VerifyOrReturn(CheckValue("nextCredentialIndex.Value()", value.nextCredentialIndex.Value(), 2U)); } break; - case 6: + case 11: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; @@ -85687,7 +85747,7 @@ class Test_TC_DRLK_2_11Suite : public TestCommand VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); } break; - case 7: + case 12: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; @@ -85703,7 +85763,7 @@ class Test_TC_DRLK_2_11Suite : public TestCommand VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); } break; - case 8: + case 13: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; @@ -85719,10 +85779,10 @@ class Test_TC_DRLK_2_11Suite : public TestCommand VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); } break; - case 9: + case 14: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 10: + case 15: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; @@ -85738,7 +85798,7 @@ class Test_TC_DRLK_2_11Suite : public TestCommand VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); } break; - case 11: + case 16: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; @@ -85754,10 +85814,10 @@ class Test_TC_DRLK_2_11Suite : public TestCommand VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); } break; - case 12: + case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 13: + case 18: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; @@ -85773,10 +85833,10 @@ class Test_TC_DRLK_2_11Suite : public TestCommand VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); } break; - case 14: + case 19: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; - case 15: + case 20: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; @@ -85788,7 +85848,7 @@ class Test_TC_DRLK_2_11Suite : public TestCommand VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); } break; - case 16: + case 21: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; @@ -85800,7 +85860,7 @@ class Test_TC_DRLK_2_11Suite : public TestCommand VerifyOrReturn(CheckValueNull("nextCredentialIndex", value.nextCredentialIndex)); } break; - case 17: + case 22: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); { chip::app::Clusters::DoorLock::Commands::GetCredentialStatusResponse::DecodableType value; @@ -85866,7 +85926,37 @@ class Test_TC_DRLK_2_11Suite : public TestCommand ); } case 3: { - LogStep(3, "TH sends Set Credential Command to DUT with type PIN"); + LogStep(3, "TH reads NumberOfTotalUsersSupported attribute and saves for future use."); + VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, + DoorLock::Attributes::NumberOfTotalUsersSupported::Id, true, chip::NullOptional); + } + case 4: { + LogStep(4, "TH reads MinPINCodeLength attribute and saves for future use."); + VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.F00"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::MinPINCodeLength::Id, true, + chip::NullOptional); + } + case 5: { + LogStep(5, "TH reads MaxPINCodeLength attribute and saves for future use."); + VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::MaxPINCodeLength::Id, true, + chip::NullOptional); + } + case 6: { + LogStep(6, "TH reads MinRFIDCodeLength attribute and saves for future use."); + VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.F01 && DRLK.S.A001a"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::MinRFIDCodeLength::Id, true, + chip::NullOptional); + } + case 7: { + LogStep(7, "TH reads MaxRFIDCodeLength attribute and saves for future use."); + VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.F01 && DRLK.S.A0019"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + return ReadAttribute(kIdentityAlpha, GetEndpoint(1), DoorLock::Id, DoorLock::Attributes::MaxRFIDCodeLength::Id, true, + chip::NullOptional); + } + case 8: { + LogStep(8, "TH sends Set Credential Command to DUT with type PIN"); VerifyOrDo(!ShouldSkip("DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -85886,8 +85976,8 @@ class Test_TC_DRLK_2_11Suite : public TestCommand ); } - case 4: { - LogStep(4, "TH sends Set Credential Command to DUT with type RFID"); + case 9: { + LogStep(9, "TH sends Set Credential Command to DUT with type RFID"); VerifyOrDo(!ShouldSkip("DRLK.S.F01 && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -85908,8 +85998,8 @@ class Test_TC_DRLK_2_11Suite : public TestCommand ); } - case 5: { - LogStep(5, "TH sends Set Credential Command to DUT with type FingerVein"); + case 10: { + LogStep(10, "TH sends Set Credential Command to DUT with type FingerVein"); VerifyOrDo(!ShouldSkip("DRLK.S.F02 && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -85929,8 +86019,8 @@ class Test_TC_DRLK_2_11Suite : public TestCommand ); } - case 6: { - LogStep(6, "TH sends Get Credential Status Command with type PIN"); + case 11: { + LogStep(11, "TH sends Get Credential Status Command with type PIN"); VerifyOrDo(!ShouldSkip("DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; @@ -85944,9 +86034,9 @@ class Test_TC_DRLK_2_11Suite : public TestCommand ); } - case 7: { - LogStep(7, "TH sends Get Credential Status Command with type RFID"); - VerifyOrDo(!ShouldSkip("DRLK.S.F01 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), + case 12: { + LogStep(12, "TH sends Get Credential Status Command with type RFID"); + VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.F01 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; @@ -85959,9 +86049,9 @@ class Test_TC_DRLK_2_11Suite : public TestCommand ); } - case 8: { - LogStep(8, "TH sends Get Credential Status Command with type FingerVein"); - VerifyOrDo(!ShouldSkip("DRLK.S.F02 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), + case 13: { + LogStep(13, "TH sends Get Credential Status Command with type FingerVein"); + VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.F02 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; @@ -85974,8 +86064,8 @@ class Test_TC_DRLK_2_11Suite : public TestCommand ); } - case 9: { - LogStep(9, "TH sends Clear Credential Command to DUT with type PIN"); + case 14: { + LogStep(14, "TH sends Clear Credential Command to DUT with type PIN"); VerifyOrDo(!ShouldSkip("DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C26.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; @@ -85989,9 +86079,9 @@ class Test_TC_DRLK_2_11Suite : public TestCommand ); } - case 10: { - LogStep(10, "TH sends Get Credential Status Command with type RFID"); - VerifyOrDo(!ShouldSkip("DRLK.S.F01 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), + case 15: { + LogStep(15, "TH sends Get Credential Status Command with type RFID"); + VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.F01 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; @@ -86004,9 +86094,9 @@ class Test_TC_DRLK_2_11Suite : public TestCommand ); } - case 11: { - LogStep(11, "TH sends Get Credential Status Command with type FingerVein"); - VerifyOrDo(!ShouldSkip("DRLK.S.F02 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), + case 16: { + LogStep(16, "TH sends Get Credential Status Command with type FingerVein"); + VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.F02 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; @@ -86019,8 +86109,8 @@ class Test_TC_DRLK_2_11Suite : public TestCommand ); } - case 12: { - LogStep(12, "TH sends Clear Credential Command to DUT with type RFID"); + case 17: { + LogStep(17, "TH sends Clear Credential Command to DUT with type RFID"); VerifyOrDo(!ShouldSkip("DRLK.S.F01 && DRLK.S.F08 && DRLK.S.C26.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; @@ -86034,9 +86124,9 @@ class Test_TC_DRLK_2_11Suite : public TestCommand ); } - case 13: { - LogStep(13, "TH sends Get Credential Status Command with type FingerVein"); - VerifyOrDo(!ShouldSkip("DRLK.S.F02 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), + case 18: { + LogStep(18, "TH sends Get Credential Status Command with type FingerVein"); + VerifyOrDo(!ShouldSkip("DRLK.S.F08 && DRLK.S.F02 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; @@ -86049,8 +86139,8 @@ class Test_TC_DRLK_2_11Suite : public TestCommand ); } - case 14: { - LogStep(14, "TH sends Clear Credential Command to DUT with type FingerVein"); + case 19: { + LogStep(19, "TH sends Clear Credential Command to DUT with type FingerVein"); VerifyOrDo(!ShouldSkip("DRLK.S.F02 && DRLK.S.F08 && DRLK.S.C26.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::ClearCredential::Type value; @@ -86064,10 +86154,9 @@ class Test_TC_DRLK_2_11Suite : public TestCommand ); } - case 15: { - LogStep(15, "TH sends Get Credential Status Command to DUT with type PIN"); - VerifyOrDo(!ShouldSkip("DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 20: { + LogStep(20, "TH sends Get Credential Status Command to DUT with type PIN"); + VerifyOrDo(!ShouldSkip("DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C24.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; @@ -86079,10 +86168,9 @@ class Test_TC_DRLK_2_11Suite : public TestCommand ); } - case 16: { - LogStep(16, "TH sends Get Credential Status Command to DUT with type RFID"); - VerifyOrDo(!ShouldSkip("DRLK.S.F01 && DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 21: { + LogStep(21, "TH sends Get Credential Status Command to DUT with type RFID"); + VerifyOrDo(!ShouldSkip("DRLK.S.F01 && DRLK.S.F08 && DRLK.S.C24.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; @@ -86094,10 +86182,9 @@ class Test_TC_DRLK_2_11Suite : public TestCommand ); } - case 17: { - LogStep(17, "TH sends Get Credential Status Command to DUT with type FingerVein"); - VerifyOrDo(!ShouldSkip("DRLK.S.F02 && DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx"), - return ContinueOnChipMainThread(CHIP_NO_ERROR)); + case 22: { + LogStep(22, "TH sends Get Credential Status Command to DUT with type FingerVein"); + VerifyOrDo(!ShouldSkip("DRLK.S.F02 && DRLK.S.F08 && DRLK.S.C24.Rsp"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); ListFreer listFreer; chip::app::Clusters::DoorLock::Commands::GetCredentialStatus::Type value; diff --git a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h index 36318231e2cb0d..6f2082a716205c 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/test/Commands.h @@ -9395,7 +9395,7 @@ class Test_TC_CC_2_1 : public TestCommandBridge { break; case 7: ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads CompensationText attribute from DUT\n"); - if (ShouldSkip("CC.S.A0005")) { + if (ShouldSkip("CC.S.A0006")) { NextTest(); return; } @@ -124986,7 +124986,7 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 6 : TH writes the RequirePINforRemoteOperation attribute value as False on the DUT and Verify " "DUT responds with UNSUPPORTED_WRITE\n"); - if (ShouldSkip("DRLK.S.F07 && DRLK.S.F00 && ! DRLK.S.A0033")) { + if (ShouldSkip("DRLK.S.F07 && DRLK.S.F00 && !DRLK.S.A0033")) { NextTest(); return; } @@ -125029,7 +125029,7 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 11 : TH writes the RequirePINforRemoteOperation attribute value as False on the DUT and Verify " "DUT responds with UNSUPPORTED_WRITE\n"); - if (ShouldSkip("DRLK.S.F07 && DRLK.S.F00 && ! DRLK.S.A0033")) { + if (ShouldSkip("DRLK.S.F07 && DRLK.S.F00 && !DRLK.S.A0033")) { NextTest(); return; } @@ -125143,7 +125143,7 @@ class Test_TC_DRLK_2_3 : public TestCommandBridge { ChipLogProgress(chipTool, " ***** Test Step 24 : TH reads the UserCodeTemporaryDisableTime attribute from the DUT and check attribute is " "triggered\n"); - if (ShouldSkip("DRLK.S.F07 && DRLK.S.F00 && DRLK.S.A0031")) { + if (ShouldSkip("DRLK.S.F00 && DRLK.S.F01 && DRLK.S.A0031")) { NextTest(); return; } @@ -128915,7 +128915,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { break; case 12: ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends Get Credential Status Command to DUT\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { + if (ShouldSkip("DRLK.S.F08 && DRLK.S.C24.Rsp")) { NextTest(); return; } @@ -128947,7 +128947,7 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { break; case 16: ChipLogProgress(chipTool, " ***** Test Step 16 : TH sends Get Credential Status Command\n"); - if (ShouldSkip("DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { + if (ShouldSkip("DRLK.S.F08 && DRLK.S.C24.Rsp")) { NextTest(); return; } @@ -129423,11 +129423,49 @@ class Test_TC_DRLK_2_9 : public TestCommandBridge { TestThSendsSetCredentialCommandToDutAndVerifyThatTheDutSendsSetCredentialResponseCommandWithResponseAsOccupiedIfTheCredentialIndexIsRepeated_10() { - chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; - value.message = chip::Span("Please enter 'y' for successgarbage: not in length on purpose", 28); - value.expectedValue.Emplace(); - value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); - return UserPrompt("alpha", value); + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + __auto_type * params = [[MTRDoorLockClusterSetCredentialParams alloc] init]; + params.operationType = [NSNumber numberWithUnsignedChar:2U]; + params.credential = [[MTRDoorLockClusterCredentialStruct alloc] init]; + ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialType = [NSNumber numberWithUnsignedChar:1U]; + ((MTRDoorLockClusterCredentialStruct *) params.credential).credentialIndex = [NSNumber numberWithUnsignedShort:3U]; + + params.credentialData = [[NSData alloc] initWithBytes:"1234567" length:7]; + params.userIndex = [NSNumber numberWithUnsignedShort:1U]; + params.userStatus = nil; + params.userType = nil; + [cluster + setCredentialWithParams:params + completion:^(MTRDoorLockClusterSetCredentialResponseParams * _Nullable values, NSError * _Nullable err) { + NSLog(@"TH sends Set Credential Command to DUT and Verify that the DUT sends Set Credential Response " + @"command with response as OCCUPIED if the CredentialIndex is repeated Error: %@", + err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + { + id actualValue = values.status; + VerifyOrReturn(CheckValue("Status", actualValue, 3U)); + } + + { + id actualValue = values.userIndex; + VerifyOrReturn(CheckValueNull("UserIndex", actualValue)); + } + + { + id actualValue = values.nextCredentialIndex; + VerifyOrReturn(CheckValueNonNull("NextCredentialIndex", actualValue)); + VerifyOrReturn(CheckValue("NextCredentialIndex", actualValue, 2U)); + } + + NextTest(); + }]; + + return CHIP_NO_ERROR; } CHIP_ERROR TestThSendsClearCredentialCommandToDut_11() @@ -129822,124 +129860,165 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { err = TestReadTheUserBackAndVerifyItsFields_2(); break; case 3: - ChipLogProgress(chipTool, " ***** Test Step 3 : TH sends Set Credential Command to DUT with type PIN\n"); - if (ShouldSkip("DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { + ChipLogProgress( + chipTool, " ***** Test Step 3 : TH reads NumberOfTotalUsersSupported attribute and saves for future use.\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.A0001")) { NextTest(); return; } - err = TestThSendsSetCredentialCommandToDutWithTypePin_3(); + err = TestThReadsNumberOfTotalUsersSupportedAttributeAndSavesForFutureUse_3(); break; case 4: - ChipLogProgress(chipTool, " ***** Test Step 4 : TH sends Set Credential Command to DUT with type RFID\n"); - if (ShouldSkip("DRLK.S.F01 && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { + ChipLogProgress(chipTool, " ***** Test Step 4 : TH reads MinPINCodeLength attribute and saves for future use.\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.F00")) { NextTest(); return; } - err = TestThSendsSetCredentialCommandToDutWithTypeRfid_4(); + err = TestThReadsMinPINCodeLengthAttributeAndSavesForFutureUse_4(); break; case 5: - ChipLogProgress(chipTool, " ***** Test Step 5 : TH sends Set Credential Command to DUT with type FingerVein\n"); - if (ShouldSkip("DRLK.S.F02 && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { + ChipLogProgress(chipTool, " ***** Test Step 5 : TH reads MaxPINCodeLength attribute and saves for future use.\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.A0001")) { NextTest(); return; } - err = TestThSendsSetCredentialCommandToDutWithTypeFingerVein_5(); + err = TestThReadsMaxPINCodeLengthAttributeAndSavesForFutureUse_5(); break; case 6: - ChipLogProgress(chipTool, " ***** Test Step 6 : TH sends Get Credential Status Command with type PIN\n"); - if (ShouldSkip("DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { + ChipLogProgress(chipTool, " ***** Test Step 6 : TH reads MinRFIDCodeLength attribute and saves for future use.\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.F01 && DRLK.S.A001a")) { NextTest(); return; } - err = TestThSendsGetCredentialStatusCommandWithTypePin_6(); + err = TestThReadsMinRFIDCodeLengthAttributeAndSavesForFutureUse_6(); break; case 7: - ChipLogProgress(chipTool, " ***** Test Step 7 : TH sends Get Credential Status Command with type RFID\n"); - if (ShouldSkip("DRLK.S.F01 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { + ChipLogProgress(chipTool, " ***** Test Step 7 : TH reads MaxRFIDCodeLength attribute and saves for future use.\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.F01 && DRLK.S.A0019")) { NextTest(); return; } - err = TestThSendsGetCredentialStatusCommandWithTypeRfid_7(); + err = TestThReadsMaxRFIDCodeLengthAttributeAndSavesForFutureUse_7(); break; case 8: - ChipLogProgress(chipTool, " ***** Test Step 8 : TH sends Get Credential Status Command with type FingerVein\n"); - if (ShouldSkip("DRLK.S.F02 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { + ChipLogProgress(chipTool, " ***** Test Step 8 : TH sends Set Credential Command to DUT with type PIN\n"); + if (ShouldSkip("DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { NextTest(); return; } - err = TestThSendsGetCredentialStatusCommandWithTypeFingerVein_8(); + err = TestThSendsSetCredentialCommandToDutWithTypePin_8(); break; case 9: - ChipLogProgress(chipTool, " ***** Test Step 9 : TH sends Clear Credential Command to DUT with type PIN\n"); - if (ShouldSkip("DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C26.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 9 : TH sends Set Credential Command to DUT with type RFID\n"); + if (ShouldSkip("DRLK.S.F01 && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { NextTest(); return; } - err = TestThSendsClearCredentialCommandToDutWithTypePin_9(); + err = TestThSendsSetCredentialCommandToDutWithTypeRfid_9(); break; case 10: - ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends Get Credential Status Command with type RFID\n"); - if (ShouldSkip("DRLK.S.F01 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { + ChipLogProgress(chipTool, " ***** Test Step 10 : TH sends Set Credential Command to DUT with type FingerVein\n"); + if (ShouldSkip("DRLK.S.F02 && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx")) { NextTest(); return; } - err = TestThSendsGetCredentialStatusCommandWithTypeRfid_10(); + err = TestThSendsSetCredentialCommandToDutWithTypeFingerVein_10(); break; case 11: - ChipLogProgress(chipTool, " ***** Test Step 11 : TH sends Get Credential Status Command with type FingerVein\n"); - if (ShouldSkip("DRLK.S.F02 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { + ChipLogProgress(chipTool, " ***** Test Step 11 : TH sends Get Credential Status Command with type PIN\n"); + if (ShouldSkip("DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { NextTest(); return; } - err = TestThSendsGetCredentialStatusCommandWithTypeFingerVein_11(); + err = TestThSendsGetCredentialStatusCommandWithTypePin_11(); break; case 12: - ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends Clear Credential Command to DUT with type RFID\n"); - if (ShouldSkip("DRLK.S.F01 && DRLK.S.F08 && DRLK.S.C26.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 12 : TH sends Get Credential Status Command with type RFID\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.F01 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { NextTest(); return; } - err = TestThSendsClearCredentialCommandToDutWithTypeRfid_12(); + err = TestThSendsGetCredentialStatusCommandWithTypeRfid_12(); break; case 13: ChipLogProgress(chipTool, " ***** Test Step 13 : TH sends Get Credential Status Command with type FingerVein\n"); - if (ShouldSkip("DRLK.S.F02 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { + if (ShouldSkip("DRLK.S.F08 && DRLK.S.F02 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { NextTest(); return; } err = TestThSendsGetCredentialStatusCommandWithTypeFingerVein_13(); break; case 14: - ChipLogProgress(chipTool, " ***** Test Step 14 : TH sends Clear Credential Command to DUT with type FingerVein\n"); - if (ShouldSkip("DRLK.S.F02 && DRLK.S.F08 && DRLK.S.C26.Rsp")) { + ChipLogProgress(chipTool, " ***** Test Step 14 : TH sends Clear Credential Command to DUT with type PIN\n"); + if (ShouldSkip("DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C26.Rsp")) { NextTest(); return; } - err = TestThSendsClearCredentialCommandToDutWithTypeFingerVein_14(); + err = TestThSendsClearCredentialCommandToDutWithTypePin_14(); break; case 15: - ChipLogProgress(chipTool, " ***** Test Step 15 : TH sends Get Credential Status Command to DUT with type PIN\n"); - if (ShouldSkip("DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { + ChipLogProgress(chipTool, " ***** Test Step 15 : TH sends Get Credential Status Command with type RFID\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.F01 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { NextTest(); return; } - err = TestThSendsGetCredentialStatusCommandToDutWithTypePin_15(); + err = TestThSendsGetCredentialStatusCommandWithTypeRfid_15(); break; case 16: - ChipLogProgress(chipTool, " ***** Test Step 16 : TH sends Get Credential Status Command to DUT with type RFID\n"); - if (ShouldSkip("DRLK.S.F01 && DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { + ChipLogProgress(chipTool, " ***** Test Step 16 : TH sends Get Credential Status Command with type FingerVein\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.F02 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { NextTest(); return; } - err = TestThSendsGetCredentialStatusCommandToDutWithTypeRfid_16(); + err = TestThSendsGetCredentialStatusCommandWithTypeFingerVein_16(); break; case 17: - ChipLogProgress(chipTool, " ***** Test Step 17 : TH sends Get Credential Status Command to DUT with type FingerVein\n"); - if (ShouldSkip("DRLK.S.F02 && DRLK.S.F08 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { + ChipLogProgress(chipTool, " ***** Test Step 17 : TH sends Clear Credential Command to DUT with type RFID\n"); + if (ShouldSkip("DRLK.S.F01 && DRLK.S.F08 && DRLK.S.C26.Rsp")) { + NextTest(); + return; + } + err = TestThSendsClearCredentialCommandToDutWithTypeRfid_17(); + break; + case 18: + ChipLogProgress(chipTool, " ***** Test Step 18 : TH sends Get Credential Status Command with type FingerVein\n"); + if (ShouldSkip("DRLK.S.F08 && DRLK.S.F02 && DRLK.S.C24.Rsp && DRLK.S.C25.Tx")) { NextTest(); return; } - err = TestThSendsGetCredentialStatusCommandToDutWithTypeFingerVein_17(); + err = TestThSendsGetCredentialStatusCommandWithTypeFingerVein_18(); + break; + case 19: + ChipLogProgress(chipTool, " ***** Test Step 19 : TH sends Clear Credential Command to DUT with type FingerVein\n"); + if (ShouldSkip("DRLK.S.F02 && DRLK.S.F08 && DRLK.S.C26.Rsp")) { + NextTest(); + return; + } + err = TestThSendsClearCredentialCommandToDutWithTypeFingerVein_19(); + break; + case 20: + ChipLogProgress(chipTool, " ***** Test Step 20 : TH sends Get Credential Status Command to DUT with type PIN\n"); + if (ShouldSkip("DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C24.Rsp")) { + NextTest(); + return; + } + err = TestThSendsGetCredentialStatusCommandToDutWithTypePin_20(); + break; + case 21: + ChipLogProgress(chipTool, " ***** Test Step 21 : TH sends Get Credential Status Command to DUT with type RFID\n"); + if (ShouldSkip("DRLK.S.F01 && DRLK.S.F08 && DRLK.S.C24.Rsp")) { + NextTest(); + return; + } + err = TestThSendsGetCredentialStatusCommandToDutWithTypeRfid_21(); + break; + case 22: + ChipLogProgress(chipTool, " ***** Test Step 22 : TH sends Get Credential Status Command to DUT with type FingerVein\n"); + if (ShouldSkip("DRLK.S.F02 && DRLK.S.F08 && DRLK.S.C24.Rsp")) { + NextTest(); + return; + } + err = TestThSendsGetCredentialStatusCommandToDutWithTypeFingerVein_22(); break; } @@ -130006,6 +130085,21 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { case 17: VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); break; + case 18: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 19: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 20: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 21: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; + case 22: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + break; } // Go on to the next test. @@ -130019,7 +130113,7 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { private: std::atomic_uint16_t mTestIndex; - const uint16_t mTestCount = 18; + const uint16_t mTestCount = 23; chip::Optional mNodeId; chip::Optional mCluster; @@ -130140,7 +130234,112 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsSetCredentialCommandToDutWithTypePin_3() + CHIP_ERROR TestThReadsNumberOfTotalUsersSupportedAttributeAndSavesForFutureUse_3() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeNumberOfTotalUsersSupportedWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads NumberOfTotalUsersSupported attribute and saves for future use. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("numberOfTotalUsersSupported", [value unsignedShortValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("numberOfTotalUsersSupported", [value unsignedShortValue], 65535U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsMinPINCodeLengthAttributeAndSavesForFutureUse_4() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMinPINCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads MinPINCodeLength attribute and saves for future use. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("minPINCodeLength", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("minPINCodeLength", [value unsignedCharValue], 255U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsMaxPINCodeLengthAttributeAndSavesForFutureUse_5() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMaxPINCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads MaxPINCodeLength attribute and saves for future use. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("maxPINCodeLength", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("maxPINCodeLength", [value unsignedCharValue], 255U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsMinRFIDCodeLengthAttributeAndSavesForFutureUse_6() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMinRFIDCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads MinRFIDCodeLength attribute and saves for future use. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("minRFIDCodeLength", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("minRFIDCodeLength", [value unsignedCharValue], 255U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThReadsMaxRFIDCodeLengthAttributeAndSavesForFutureUse_7() + { + + MTRBaseDevice * device = GetDevice("alpha"); + __auto_type * cluster = [[MTRBaseClusterDoorLock alloc] initWithDevice:device endpointID:@(1) queue:mCallbackQueue]; + VerifyOrReturnError(cluster != nil, CHIP_ERROR_INCORRECT_STATE); + + [cluster readAttributeMaxRFIDCodeLengthWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable err) { + NSLog(@"TH reads MaxRFIDCodeLength attribute and saves for future use. Error: %@", err); + + VerifyOrReturn(CheckValue("status", err ? err.code : 0, 0)); + + VerifyOrReturn(CheckConstraintMinValue("maxRFIDCodeLength", [value unsignedCharValue], 0U)); + VerifyOrReturn(CheckConstraintMaxValue("maxRFIDCodeLength", [value unsignedCharValue], 255U)); + + NextTest(); + }]; + + return CHIP_NO_ERROR; + } + + CHIP_ERROR TestThSendsSetCredentialCommandToDutWithTypePin_8() { MTRBaseDevice * device = GetDevice("alpha"); @@ -130186,7 +130385,7 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsSetCredentialCommandToDutWithTypeRfid_4() + CHIP_ERROR TestThSendsSetCredentialCommandToDutWithTypeRfid_9() { MTRBaseDevice * device = GetDevice("alpha"); @@ -130232,7 +130431,7 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsSetCredentialCommandToDutWithTypeFingerVein_5() + CHIP_ERROR TestThSendsSetCredentialCommandToDutWithTypeFingerVein_10() { MTRBaseDevice * device = GetDevice("alpha"); @@ -130278,7 +130477,7 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsGetCredentialStatusCommandWithTypePin_6() + CHIP_ERROR TestThSendsGetCredentialStatusCommandWithTypePin_11() { MTRBaseDevice * device = GetDevice("alpha"); @@ -130332,7 +130531,7 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsGetCredentialStatusCommandWithTypeRfid_7() + CHIP_ERROR TestThSendsGetCredentialStatusCommandWithTypeRfid_12() { MTRBaseDevice * device = GetDevice("alpha"); @@ -130386,7 +130585,7 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsGetCredentialStatusCommandWithTypeFingerVein_8() + CHIP_ERROR TestThSendsGetCredentialStatusCommandWithTypeFingerVein_13() { MTRBaseDevice * device = GetDevice("alpha"); @@ -130440,7 +130639,7 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsClearCredentialCommandToDutWithTypePin_9() + CHIP_ERROR TestThSendsClearCredentialCommandToDutWithTypePin_14() { MTRBaseDevice * device = GetDevice("alpha"); @@ -130464,7 +130663,7 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsGetCredentialStatusCommandWithTypeRfid_10() + CHIP_ERROR TestThSendsGetCredentialStatusCommandWithTypeRfid_15() { MTRBaseDevice * device = GetDevice("alpha"); @@ -130518,7 +130717,7 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsGetCredentialStatusCommandWithTypeFingerVein_11() + CHIP_ERROR TestThSendsGetCredentialStatusCommandWithTypeFingerVein_16() { MTRBaseDevice * device = GetDevice("alpha"); @@ -130572,7 +130771,7 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsClearCredentialCommandToDutWithTypeRfid_12() + CHIP_ERROR TestThSendsClearCredentialCommandToDutWithTypeRfid_17() { MTRBaseDevice * device = GetDevice("alpha"); @@ -130596,7 +130795,7 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsGetCredentialStatusCommandWithTypeFingerVein_13() + CHIP_ERROR TestThSendsGetCredentialStatusCommandWithTypeFingerVein_18() { MTRBaseDevice * device = GetDevice("alpha"); @@ -130650,7 +130849,7 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsClearCredentialCommandToDutWithTypeFingerVein_14() + CHIP_ERROR TestThSendsClearCredentialCommandToDutWithTypeFingerVein_19() { MTRBaseDevice * device = GetDevice("alpha"); @@ -130674,7 +130873,7 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsGetCredentialStatusCommandToDutWithTypePin_15() + CHIP_ERROR TestThSendsGetCredentialStatusCommandToDutWithTypePin_20() { MTRBaseDevice * device = GetDevice("alpha"); @@ -130724,7 +130923,7 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsGetCredentialStatusCommandToDutWithTypeRfid_16() + CHIP_ERROR TestThSendsGetCredentialStatusCommandToDutWithTypeRfid_21() { MTRBaseDevice * device = GetDevice("alpha"); @@ -130774,7 +130973,7 @@ class Test_TC_DRLK_2_11 : public TestCommandBridge { return CHIP_NO_ERROR; } - CHIP_ERROR TestThSendsGetCredentialStatusCommandToDutWithTypeFingerVein_17() + CHIP_ERROR TestThSendsGetCredentialStatusCommandToDutWithTypeFingerVein_22() { MTRBaseDevice * device = GetDevice("alpha"); diff --git a/zzz_generated/placeholder/app1/zap-generated/test/Commands.h b/zzz_generated/placeholder/app1/zap-generated/test/Commands.h index 4e02f06118f737..5a27a73ec2f866 100644 --- a/zzz_generated/placeholder/app1/zap-generated/test/Commands.h +++ b/zzz_generated/placeholder/app1/zap-generated/test/Commands.h @@ -997,18 +997,22 @@ class Test_TC_I_3_1_SimulatedSuite : public TestCommand { case 0: { LogStep(0, "Read attribute: IdentifyTime"); + VerifyOrDo(!ShouldSkip("I.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return WaitAttribute(GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyTime::Id); } case 1: { LogStep(1, "write attribute: IdentifyTime"); + VerifyOrDo(!ShouldSkip("I.C.AM-WRITE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return WaitAttribute(GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyTime::Id); } case 2: { LogStep(2, "Readback attribute: IdentifyTime"); + VerifyOrDo(!ShouldSkip("I.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return WaitAttribute(GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyTime::Id); } case 3: { LogStep(3, "Read attribute: identifytype"); + VerifyOrDo(!ShouldSkip("I.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return WaitAttribute(GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyType::Id); } case 4: { @@ -1026,7 +1030,7 @@ class Test_TC_I_3_1_SimulatedSuite : public TestCommand } case 5: { LogStep(5, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && I.C.AO-READ"), 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); @@ -1038,7 +1042,7 @@ class Test_TC_I_3_1_SimulatedSuite : public TestCommand LogStep(6, "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && I.C.AO-WRITE"), 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); @@ -1111,38 +1115,47 @@ class Test_TC_PRS_3_1_SimulatedSuite : public TestCommand { case 0: { LogStep(0, "Read attribute: MeasuredValue"); + VerifyOrDo(!ShouldSkip("PRS.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::MeasuredValue::Id); } case 1: { LogStep(1, "Read attribute: MinMeasuredValue"); + VerifyOrDo(!ShouldSkip("PRS.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::MinMeasuredValue::Id); } case 2: { LogStep(2, "Read attribute: MaxMeasuredValue"); + VerifyOrDo(!ShouldSkip("PRS.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::MaxMeasuredValue::Id); } case 3: { LogStep(3, "Read attribute: Tolerance"); + VerifyOrDo(!ShouldSkip("PRS.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::Tolerance::Id); } case 4: { LogStep(4, "Read attribute: ScaledValue"); + VerifyOrDo(!ShouldSkip("PRS.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::ScaledValue::Id); } case 5: { LogStep(5, "Read attribute: MinScaledValue"); + VerifyOrDo(!ShouldSkip("PRS.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::MinScaledValue::Id); } case 6: { LogStep(6, "Read attribute: MaxScaledValue"); + VerifyOrDo(!ShouldSkip("PRS.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::MaxScaledValue::Id); } case 7: { LogStep(7, "Read attribute: ScaledTolerance"); + VerifyOrDo(!ShouldSkip("PRS.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::ScaledTolerance::Id); } case 8: { LogStep(8, "Read attribute: Scale"); + VerifyOrDo(!ShouldSkip("PRS.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::Scale::Id); } case 9: { @@ -1160,7 +1173,7 @@ class Test_TC_PRS_3_1_SimulatedSuite : public TestCommand } case 10: { LogStep(10, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && PRS.C.AO-READ"), 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); @@ -1172,7 +1185,7 @@ class Test_TC_PRS_3_1_SimulatedSuite : public TestCommand LogStep(11, "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && PRS.C.AO-WRITE"), 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); @@ -1188,7 +1201,7 @@ class Test_TC_PRS_3_1_SimulatedSuite : public TestCommand class Test_TC_PS_3_1_SimulatedSuite : public TestCommand { public: - Test_TC_PS_3_1_SimulatedSuite() : TestCommand("Test_TC_PS_3_1_Simulated", 31) + Test_TC_PS_3_1_SimulatedSuite() : TestCommand("Test_TC_PS_3_1_Simulated", 34) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -1216,6 +1229,18 @@ class Test_TC_PS_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { + case 31: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 32: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 33: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -1355,6 +1380,41 @@ class Test_TC_PS_3_1_SimulatedSuite : public TestCommand LogStep(30, "Read attribute: ActiveBatChargeFaults"); return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::ActiveBatChargeFaults::Id); } + case 31: { + LogStep(31, + "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " + "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList. Commission " + "DUT to TH again"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 32: { + LogStep(32, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 33: { + LogStep(33, + "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " + "specific order"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } } return CHIP_NO_ERROR; } @@ -2139,12 +2199,12 @@ class Test_TC_OCC_2_4_SimulatedSuite : public TestCommand { case 0: { LogStep(0, "TH reads OccupancySensorType attribute from DUT"); - VerifyOrDo(!ShouldSkip("OCC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("OCC.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorType::Id); } case 1: { LogStep(1, "TH reads OccupancySensorTypeBitmap attribute from DUT"); - VerifyOrDo(!ShouldSkip("OCC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("OCC.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id); } } diff --git a/zzz_generated/placeholder/app2/zap-generated/test/Commands.h b/zzz_generated/placeholder/app2/zap-generated/test/Commands.h index 4e02f06118f737..5a27a73ec2f866 100644 --- a/zzz_generated/placeholder/app2/zap-generated/test/Commands.h +++ b/zzz_generated/placeholder/app2/zap-generated/test/Commands.h @@ -997,18 +997,22 @@ class Test_TC_I_3_1_SimulatedSuite : public TestCommand { case 0: { LogStep(0, "Read attribute: IdentifyTime"); + VerifyOrDo(!ShouldSkip("I.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return WaitAttribute(GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyTime::Id); } case 1: { LogStep(1, "write attribute: IdentifyTime"); + VerifyOrDo(!ShouldSkip("I.C.AM-WRITE"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return WaitAttribute(GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyTime::Id); } case 2: { LogStep(2, "Readback attribute: IdentifyTime"); + VerifyOrDo(!ShouldSkip("I.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return WaitAttribute(GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyTime::Id); } case 3: { LogStep(3, "Read attribute: identifytype"); + VerifyOrDo(!ShouldSkip("I.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return WaitAttribute(GetEndpoint(1), Identify::Id, Identify::Attributes::IdentifyType::Id); } case 4: { @@ -1026,7 +1030,7 @@ class Test_TC_I_3_1_SimulatedSuite : public TestCommand } case 5: { LogStep(5, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && I.C.AO-READ"), 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); @@ -1038,7 +1042,7 @@ class Test_TC_I_3_1_SimulatedSuite : public TestCommand LogStep(6, "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && I.C.AO-WRITE"), 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); @@ -1111,38 +1115,47 @@ class Test_TC_PRS_3_1_SimulatedSuite : public TestCommand { case 0: { LogStep(0, "Read attribute: MeasuredValue"); + VerifyOrDo(!ShouldSkip("PRS.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::MeasuredValue::Id); } case 1: { LogStep(1, "Read attribute: MinMeasuredValue"); + VerifyOrDo(!ShouldSkip("PRS.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::MinMeasuredValue::Id); } case 2: { LogStep(2, "Read attribute: MaxMeasuredValue"); + VerifyOrDo(!ShouldSkip("PRS.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::MaxMeasuredValue::Id); } case 3: { LogStep(3, "Read attribute: Tolerance"); + VerifyOrDo(!ShouldSkip("PRS.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::Tolerance::Id); } case 4: { LogStep(4, "Read attribute: ScaledValue"); + VerifyOrDo(!ShouldSkip("PRS.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::ScaledValue::Id); } case 5: { LogStep(5, "Read attribute: MinScaledValue"); + VerifyOrDo(!ShouldSkip("PRS.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::MinScaledValue::Id); } case 6: { LogStep(6, "Read attribute: MaxScaledValue"); + VerifyOrDo(!ShouldSkip("PRS.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::MaxScaledValue::Id); } case 7: { LogStep(7, "Read attribute: ScaledTolerance"); + VerifyOrDo(!ShouldSkip("PRS.C.AO-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::ScaledTolerance::Id); } case 8: { LogStep(8, "Read attribute: Scale"); + VerifyOrDo(!ShouldSkip("PRS.C.AM-READ"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return WaitAttribute(GetEndpoint(0), PressureMeasurement::Id, PressureMeasurement::Attributes::Scale::Id); } case 9: { @@ -1160,7 +1173,7 @@ class Test_TC_PRS_3_1_SimulatedSuite : public TestCommand } case 10: { LogStep(10, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && PRS.C.AO-READ"), 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); @@ -1172,7 +1185,7 @@ class Test_TC_PRS_3_1_SimulatedSuite : public TestCommand LogStep(11, "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " "specific order"); - VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP && PRS.C.AO-WRITE"), 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); @@ -1188,7 +1201,7 @@ class Test_TC_PRS_3_1_SimulatedSuite : public TestCommand class Test_TC_PS_3_1_SimulatedSuite : public TestCommand { public: - Test_TC_PS_3_1_SimulatedSuite() : TestCommand("Test_TC_PS_3_1_Simulated", 31) + Test_TC_PS_3_1_SimulatedSuite() : TestCommand("Test_TC_PS_3_1_Simulated", 34) { AddArgument("nodeId", 0, UINT64_MAX, &mNodeId); AddArgument("cluster", &mCluster); @@ -1216,6 +1229,18 @@ class Test_TC_PS_3_1_SimulatedSuite : public TestCommand switch (mTestIndex - 1) { + case 31: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 32: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; + case 33: + VerifyOrReturn(CheckValue("status", chip::to_underlying(status.mStatus), 0)); + shouldContinue = true; + break; default: LogErrorOnFailure(ContinueOnChipMainThread(CHIP_ERROR_INVALID_ARGUMENT)); } @@ -1355,6 +1380,41 @@ class Test_TC_PS_3_1_SimulatedSuite : public TestCommand LogStep(30, "Read attribute: ActiveBatChargeFaults"); return WaitAttribute(GetEndpoint(0), PowerSource::Id, PowerSource::Attributes::ActiveBatChargeFaults::Id); } + case 31: { + LogStep(31, + "Configure TH such that it implements mandatory and none of the optional attributes of the server-side of the " + "cluster, and that it also reflects this in global attributes such as FeatureMap and AttributeList. Commission " + "DUT to TH again"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 32: { + LogStep(32, "DUT reads all supported optional attributes from TH one at a time in a manufacturer specific order"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } + case 33: { + LogStep(33, + "DUT writes a suitable value to all supported optional attributes on the TH one at a time in a manufacturer " + "specific order"); + VerifyOrDo(!ShouldSkip("PICS_SKIP_SAMPLE_APP"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + ListFreer listFreer; + chip::app::Clusters::LogCommands::Commands::UserPrompt::Type value; + value.message = chip::Span("Enter 'y' after successgarbage: not in length on purpose", 23); + value.expectedValue.Emplace(); + value.expectedValue.Value() = chip::Span("ygarbage: not in length on purpose", 1); + return UserPrompt(kIdentityAlpha, value); + } } return CHIP_NO_ERROR; } @@ -2139,12 +2199,12 @@ class Test_TC_OCC_2_4_SimulatedSuite : public TestCommand { case 0: { LogStep(0, "TH reads OccupancySensorType attribute from DUT"); - VerifyOrDo(!ShouldSkip("OCC.S.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("OCC.C.A0001"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorType::Id); } case 1: { LogStep(1, "TH reads OccupancySensorTypeBitmap attribute from DUT"); - VerifyOrDo(!ShouldSkip("OCC.S.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); + VerifyOrDo(!ShouldSkip("OCC.C.A0002"), return ContinueOnChipMainThread(CHIP_NO_ERROR)); return WaitAttribute(GetEndpoint(0), OccupancySensing::Id, OccupancySensing::Attributes::OccupancySensorTypeBitmap::Id); } }