Skip to content

Commit

Permalink
Added DRLK-2.5 and DRLK-2.9 python script (project-chip#35201)
Browse files Browse the repository at this point in the history
* added drlkcluster variable

* Delete src/python_testing/TC_DRLK_2_9.py

* added DRLK_2.5 python script

* Added Script DRLK_2.9

* removed DRLK_2_5 yaml file

* removed DRLK_2.9.yaml file

* updated DLOG_2_1.yaml

* removed redefined command clear user

* removed unsed var

* removed unused var

* Updated TC_DRLK_2_4.yaml script as per test plan

* Updated the TC to include PIN, Aliro combination and do Modify credential

* Restyled by autopep8

* updated PICS

* Appended steps to check modify of both PIN and Aliro credentiaType is as expected

* Updated DRLK-2.5 test case as per PR comment
1.correted test step description for step 4,5,6 and 9
2.Corrected steps 5,6 and 9

* Updated DRLK-2.9
1. Corrected test step description
2. Corrected PICS
3. Validated arrtibutes read based on respective range
4. modified get_user function to check for given credentialsirespective to the order of credentials listed

* Added nextcredentialIndex check in get_credential_status function

* fixed code-lints error

* Added generate_max_pincode_len for generating valid pin code of Max pincode length

* Restyled by isort

* added a check in get_user funtion that length of given Credential list matches with length of response credential list

* PR review -Init the pin and rid variables

* fixed lint error

---------

Co-authored-by: Restyled.io <commits@restyled.io>
  • Loading branch information
sumaky and restyled-commits authored Sep 30, 2024
1 parent a831d0a commit f54e3c8
Show file tree
Hide file tree
Showing 6 changed files with 1,329 additions and 938 deletions.
93 changes: 53 additions & 40 deletions src/app/tests/suites/certification/Test_TC_DLOG_2_1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,18 @@ tests:
Length of TransferFileDesignator is equal to 32 characters
Length of TransferFileDesignator is greater than 32 characters
To send a message that mismatches the current transfer mode
1. Execute the below commands in the interactive mode:
./chip-tool interactive start
2. Before running the below steps ensure that \tmp folder on the system does not contain the below files.
If they are present please delete these files:
TH_LOG_OK_NORMAL : "Length_1234567.txt"
TH_LOG_OK_FULL_LENGTH : "Length_123456789123456789123.txt"
3. Use the below command in the all-cluster-app for setting up the diagonistics logs.
./chip-all-clusters-app --trace_decode 1 --end_user_support_log ~/tmp/end_user_support_log.txt --network_diagnostics_log ~/tmp/nw_log.txt --crash_log ~/tmp/crash_log.txt
The log file content can be set such that the file size can be as follows to obtain different status code from DUT:
1. end_user_support_log > 1024 bytes
2. Make sure that nw_log.txt does not exist
3. crash_log < 1024 bytes
disabled: true

- label: "Step 1: Commission DUT to TH"
Expand Down Expand Up @@ -187,7 +199,7 @@ tests:
TH_LOG_OK_NORMAL)"
PICS: MCORE.BDX.Initiator
verification: |
"diagnosticlogs retrieve-logs-request 0 1 1 0 --TransferFileDesignator Length_1234567.txt
diagnosticlogs retrieve-logs-request 0 1 1 0 --TransferFileDesignator Length_1234567.txt
On TH(chip-tool), Verify that the DUT sends SendInit message with TransferFileDesignator field set to Length_1234567891234567891
[1707967645.770994][10882:10885] CHIP:ATM: SendInit
Expand Down Expand Up @@ -219,7 +231,7 @@ tests:
by setting Intent field to . NetworkDiag . CrashLogs"
PICS: MCORE.BDX.Initiator
verification: |
"diagnosticlogs retrieve-logs-request 0 0 1 0
diagnosticlogs retrieve-logs-request 0 0 1 0
On TH(chip-tool), Verify that the DUT responds with Success(0) status code for the RetrieveLogsResponse command Verify that LogContent field contains at most 1024 bytes
Expand Down Expand Up @@ -254,7 +266,7 @@ tests:
EndUserSupport, RequestedProtocol= BDX)"
PICS: MCORE.BDX.Initiator
verification: |
"diagnosticlogs retrieve-logs-request 0 1 1 0
diagnosticlogs retrieve-logs-request 0 1 1 0
On TH(chip-tool), Verify that the DUT responds with INVALID_COMMAND for the RetrieveLogsRequest that was sent without TransferFileDesignator
Expand Down Expand Up @@ -290,7 +302,7 @@ tests:
RequestedProtocol= BDX, TransferFileDesignator = TH_LOG_OK_NORMAL)"
PICS: "!MCORE.BDX.Initiator"
verification: |
"diagnosticlogs retrieve-logs-request 0 1 1 0 --TransferFileDesignator Length_1234567.txt
diagnosticlogs retrieve-logs-request 0 1 1 0 --TransferFileDesignator Length_1234567.txt
On TH(chip-tool), Verify that the DUT responds with Exhausted(1) status code for the RetrieveLogsResponse command with the LogContent field containing at most 1024 bytes
Expand All @@ -299,14 +311,40 @@ tests:
[1707979121.749593][7593:7596] CHIP:TOO: logContent: 31353238303033363031313533353030333730303234303030303234303133653234303230313138333530313331303034373032313533313031316230323330383230323137303630393261383634383836663730643031303730326130383230323038333038323032303430323031303333313064333030623036303936303836343830313635303330343032303133303832303137303036303932613836343838366637306430313037303161303832303136313034383230313564313532343030303132353031663166663336303230353030383030353031383030353032383030353033383030353034383030353035383030353036383030353037383030353038383030353039383030353061383030353062383030353063383030353064383030353065383030353066383030353130383030353131383030353132383030353133383030353134383030353135383030353136383030353137383030353138383030353139383030353161383030353162383030353163383030353164383030353165383030353166383030353230383030353231383030353232383030353233383030353234383030353235383030353236383030353237383030353238383030353239383030353261383030353262383030353263383030353264383030353265383030353266383030353330383030353331383030353332383030353333383030353334383030353335383030353336383030353337383030353338383030353339383030353361383030353362383030353363383030353364383030353365383030353366383030353430383030353431383030353432383030353433383030353434383030353435383030353436383030353437383030353438383030353439383030353461383030353462383030353463383030353464383030353465383030353466383030353530383030353531383030353532383030353533383030353534383030353535383030353536383030353537383030353538383030353539383030353561383030353562383030353563383030353564383030353565383030353566383030353630383030353631383030353632383030353633383031383234303331363263303431333433353334313330333033303330333035333537343333303330333033303330326433303330323430353030323430363030323430373031323430383030313833313763333037613032303130333830313466653334336639353939343737363362363165653435333931333133333834393466653637643865333030623036303936303836343830633733653461363039363038363438303630393630383634383036303936303836343830363039363038363438303630393630383634383036303936303836}"
disabled: true

- label:
"Step 11: TH sends RetrieveLogsRequest Command to DUT with Invalid
Intent : RetrieveLogsRequest(Intent = 3, RequestedProtocol= BDX,
TransferFileDesignator = TH_LOG_OK_NORMAL) Repeat this step with
RequestedProtocol as ResponsePayload"
verification: |
diagnosticlogs retrieve-logs-request 3 0 1 0 --TransferFileDesignator Length_1234567.txt
On TH(chip-tool), Verify that the DUT responds with INVALID_COMMAND for the RetrieveLogsRequest that was sent invalid Intent(3)
[1707901794.468552][36124:36127] CHIP:DMG: StatusIB =
[1707901794.468560][36124:36127] CHIP:DMG: {
[1707901794.468569][36124:36127] CHIP:DMG: status = 0x85 (INVALID_COMMAND),
[1707901794.468576][36124:36127] CHIP:DMG: },
[1707901794.468584][36124:36127] CHIP:DMG:
[1707901794.468591][36124:36127] CHIP:DMG: },
Repeat this step by setting RequestedProtocol as ResponsePayload :
diagnosticlogs retrieve-logs-request 3 1 1 0 --TransferFileDesignator Length_1234567.txt
On TH(chip-tool), Verify that the DUT responds with INVALID_COMMAND for the RetrieveLogsRequest that was sent invalid Intent(3)
[1707901794.468552][36124:36127] CHIP:DMG: StatusIB =
[1707901794.468560][36124:36127] CHIP:DMG: {
[1707901794.468569][36124:36127] CHIP:DMG: status = 0x85 (INVALID_COMMAND),
[1707901794.468576][36124:36127] CHIP:DMG: },
disabled: true

- label:
"Step 12: TH sends RetrieveLogsRequest Command to DUT with Invalid
RequestedProtocol : RetrieveLogsRequest(Intent =
EndUserSupport,RequestedProtocol= 2, TransferFileDesignator =
TH_LOG_OK_NORMAL)"
PICS: MCORE.BDX.Initiator
verification: |
"diagnosticlogs retrieve-logs-request 0 2 1 0 --TransferFileDesignator Length_1234567.txt
diagnosticlogs retrieve-logs-request 0 2 1 0 --TransferFileDesignator Length_1234567.txt
On TH(chip-tool), Verify that the DUT responds with INVALID_COMMAND for the RetrieveLogsRequest that was sent Invalid RequestedProtocol(2)
Expand Down Expand Up @@ -344,39 +382,14 @@ tests:
TransferFileDesignator length : RetrieveLogsRequest(Intent =
EndUserSupport,RequestedProtocol= BDX, TransferFileDesignator =
TH_LOG_ERROR_EMPTY)"
PICS: MCORE.BDX.Initiator
verification: |
"diagnosticlogs retrieve-logs-request 0 1 1 0 --TransferFileDesignator ''
[1707904517.151453][36678:36681] CHIP:DMG: ICR moving to [ResponseRe]
[1707904517.151489][36678:36681] CHIP:DMG: InvokeResponseMessage =
[1707904517.151501][36678:36681] CHIP:DMG: {
[1707904517.151511][36678:36681] CHIP:DMG: suppressResponse = false,
[1707904517.151522][36678:36681] CHIP:DMG: InvokeResponseIBs =
[1707904517.151541][36678:36681] CHIP:DMG: [
[1707904517.151548][36678:36681] CHIP:DMG: InvokeResponseIB =
[1707904517.151565][36678:36681] CHIP:DMG: {
[1707904517.151573][36678:36681] CHIP:DMG: CommandStatusIB =
[1707904517.151582][36678:36681] CHIP:DMG: {
[1707904517.151590][36678:36681] CHIP:DMG: CommandPathIB =
[1707904517.151599][36678:36681] CHIP:DMG: {
[1707904517.151613][36678:36681] CHIP:DMG: EndpointId = 0x0,
[1707904517.151627][36678:36681] CHIP:DMG: ClusterId = 0x32,
[1707904517.151640][36678:36681] CHIP:DMG: CommandId = 0x0,
[1707904517.151652][36678:36681] CHIP:DMG: },
[1707904517.151670][36678:36681] CHIP:DMG:
[1707904517.151681][36678:36681] CHIP:DMG: StatusIB =
[1707904517.151696][36678:36681] CHIP:DMG: {
[1707904517.151708][36678:36681] CHIP:DMG: status = 0x87 (CONSTRAINT_ERROR),
[1707904517.151720][36678:36681] CHIP:DMG: },
[1707904517.151734][36678:36681] CHIP:DMG:
[1707904517.151745][36678:36681] CHIP:DMG: },
[1707904517.151763][36678:36681] CHIP:DMG:
[1707904517.151772][36678:36681] CHIP:DMG: },
[1707904517.151790][36678:36681] CHIP:DMG:
[1707904517.151798][36678:36681] CHIP:DMG: ],
[1707904517.151816][36678:36681] CHIP:DMG:
[1707904517.151824][36678:36681] CHIP:DMG: InteractionModelRevision = 11
[1707904517.151830][36678:36681] CHIP:DMG: },"
diagnosticlogs retrieve-logs-request 0 1 1 0 --TransferFileDesignator ''
On TH(chip-tool), Verify that DUT sends RetrieveLogsResponse command to TH with Denied(4) status code.
[1719990173.360981][8053:8056] CHIP:TOO: RetrieveLogsResponse: {
[1719990173.361009][8053:8056] CHIP:TOO: status: 4
[1719990173.361021][8053:8056] CHIP:TOO: logContent:
[1719990173.361030][8053:8056] CHIP:TOO: }
disabled: true

- label:
Expand All @@ -385,9 +398,9 @@ tests:
EndUserSupport,RequestedProtocol= BDX, TransferFileDesignator =
TH_LOG_BAD_LENGTH)"
verification: |
"diagnosticlogs retrieve-logs-request 0 1 1 0 --TransferFileDesignator Length_1234567891234567891234567891212345.txt
diagnosticlogs retrieve-logs-request 0 1 1 0 --TransferFileDesignator Length_1234567891234567891234567891212345.txt
On TH(chip-tool), Verify that the DUT responds with CONSTRAINT_ERRORfor the RetrieveLogsRequest that was sent Invalid Invalid TransferFileDesignator length(> 32)
On TH(chip-tool), Verify that the DUT responds with CONSTRAINT_ERROR for the RetrieveLogsRequest that was sent Invalid Invalid TransferFileDesignator length(> 32)
[1707904517.151453][36678:36681] CHIP:DMG: ICR moving to [ResponseRe]
[1707904517.151489][36678:36681] CHIP:DMG: InvokeResponseMessage =
Expand Down
Loading

0 comments on commit f54e3c8

Please sign in to comment.